
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  S	 r\R                   " S
 S\R                  5      5       rg)zCUpdates non-gcloud CLI command trees in the installation directory.    )absolute_import)division)unicode_literals)arg_parsers)base)cli_tree)generate_cli_treesc            	          SR                  [        [        R                  /[	        [
        R                  R                  5       5      -   5      5      $ )Nz, )joinsortedr   DEFAULT_CLI_NAMElistr	   
GENERATORSkeys     $lib/surface/meta/cli_trees/update.py_GetCliTreeGeneratorListr      sD    	$$
%#..33567
 r   c                   6    \ rS rSrSrS\0r\S 5       rS r	Sr
g)Update%   a2  Updates gcloud CLI command trees in the installation directory.

A CLI tree is a module or JSON file that describes a command and its
subcommands, flags, arguments, help text and TAB completers.
*gcloud interactive* uses CLI trees for typeahead, command line completion,
and as-you-type documentation.

Most CLI tree files are cached in the *cli* subdirectory of the *gcloud*
installation root directory. The cache is automatically updated by the
Cloud SDK installers and the *gcloud components* command group.

These CLIs are currently supported: {generators}.

generatorsc                     U R                  S[        R                  " 5       SSS9  U R                  SSS9  U R                  SS	S
S9  U R                  SSS9  U R                  SS	SSS9  g )Nz
--commandsCOMMANDz&Update only the commands in this list.)typemetavarhelpz--directoryzDUpdate this directory instead of the default installation directory.)r   z--force
store_truezOForce existing CLI trees to be out of date. This causes them to be regenerated.)actionr   z	--tarballzFor packaging CLI trees. --commands specifies one command that is a relative path in this tarball. The tarball is extracted to a temporary directory and the command path is adjusted to point to the temporary directory.z--skip-completionsFz-Skip updating the static completion CLI tree.)r   defaultr   )add_argumentr   ArgList)parsers    r   ArgsUpdate.Args7   s    
  "5	      !	   <   <	  r   c           
          [         R                  " U R                  UR                  UR                  UR
                  UR                  UR                  (       + UR                  S9  g )N)clicommands	directorytarballforceverboseskip_completions)	r	   UpdateCliTrees_cli_power_users_onlyr(   r)   r*   r+   quietr-   )selfargss     r   Run
Update.Run^   sG    %%&&..jjJJ..r   r   N)__name__
__module____qualname____firstlineno____doc__r   detailed_helpstaticmethodr$   r3   __static_attributes__r   r   r   r   r   %   s,      !9:-$ $L	r   r   N)r9   
__future__r   r   r   googlecloudsdk.callioper   r   r   googlecloudsdk.command_lib.metar	   r   UniverseCompatibleCommandr   r   r   r   <module>rB      sM     J &  ' / ( , > AT\\ A Ar   