
    h|                        % S SK r S SKrS SKJrJrJrJrJrJrJ	r	J
r
JrJrJr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JrJr  S SKJr  S S	KJr   S
SKJr  / SQr%\ RL                  " \'5      r(/ r)\\*   \+S'   0 r,SSSS.SSSS.S.r-\\*\\*\*4   4   \+S'   \-S   r.\-S   =r/r0\\\\
\4r1 " S S\5      r2\\\24r3\	\
\4r4S r5S \*4S! jr6\ " S" S#5      5       r7 " S$ S%5      r " S& S'5      r8S \*S(\*4S) jr9S*\*S(\*4S+ jr:S, r;S?S- jr<\5" S.5      S@S/ j5       r=S0 r>\5" S15      S@S2 j5       r?\5" S35      S@S4 j5       r@  SAS5\S \*S6\\*   S7\\*\\*\*4   4   S8\\   S(\*4S9 jjrA  SBS:\\   S7\\*\\*\*4   4   4S; jjrB    SCS5\S<\\*\\*   4   S=\*S:\\   S7\\*\\*\*4   4   4
S> jjrCg! \  a$     S SK!J"r"  \"" S\#S9r GNa! \ \$4 a    Sr  GNof = ff = f)D    N)ONE_OR_MORE	REMAINDERSUPPRESSZERO_OR_MOREActionArgumentParser_AppendAction_AppendConstAction_CountAction_HelpAction_StoreConstAction_VersionAction)defaultdict)total_ordering)starmap)Template)AnyDictList)Optional)Union   )__version__)get_versionz..)rootrelative_toUNKNOWN)completeadd_argument_toSUPPORTED_SHELLSFILE	DIRECTORYDIRr    _shtab_compgen_files_filesf)bashzshtcsh_shtab_compgen_dirsz	_files -/d)file	directoryCHOICE_FUNCTIONSr,   r-   c                       \ rS rSrSrg)_ShtabPrintCompletionAction6    N)__name__
__module____qualname____firstlineno____static_attributes__r2       H/home/james-whalen/.local/lib/python3.13/site-packages/shtab/__init__.pyr0   r0   6   s    r8   r0   c                    ^  U 4S jnU$ )Nc                 X   > T[         ;  a  [         R                  T5        U [        T'   U $ N)r    append_SUPPORTED_COMPLETERS)funcshells    r9   wrappermark_completer.<locals>.wrapper?   s*    ((##E*'+e$r8   r2   )r@   rA   s   ` r9   mark_completerrC   >   s     Nr8   r@   c                 ~     [         U    $ ! [         a'    SR                  [        5      n[	        SU  SU 35      ef = f)N,zshell (z) must be in )r>   KeyErrorjoinr    NotImplementedError)r@   	supporteds     r9   get_completerrJ   H   sK    M$U++ MHH-.	!GE7-	{"KLLMs    1<c                   v    \ rS rSrSrSS\S\SS4S jjrS\4S jrS	\	S\
4S
 jrS	\	S\4S jrS	\	S\4S jrSrg)ChoiceP   zv
Placeholder to mark a special completion `<type>`.

>>> ArgumentParser.add_argument(..., choices=[Choice("<type>")])
choice_typerequiredreturnNc                     X l         Xl        g)z{
See below for parameters.

choice_type  : internal `type` name
required  : controls result of comparison to empty strings
NrO   type)selfrN   rO   s      r9   __init__Choice.__init__W   s     !	r8   c                 J    U R                   U R                  (       a  S-   $ S-   $ )N ?)rS   rO   )rT   s    r9   __repr__Choice.__repr__a   s    yy$--B99S99r8   otherc                 <    U R                   (       a  U(       a  S$ S$ g)Nr   )rO   rT   r\   s     r9   __cmp__Choice.__cmp__d   s    ==1%2%r8   c                 *    U R                  U5      S:H  $ Nr   r`   r_   s     r9   __eq__Choice.__eq__i   s    ||E"a''r8   c                 *    U R                  U5      S:  $ rc   rd   r_   s     r9   __lt__Choice.__lt__l   s    ||E"Q&&r8   rR   )F)r3   r4   r5   r6   __doc__strboolrU   rZ   objectintr`   re   rh   r7   r2   r8   r9   rL   rL   P   sf    
 C  4  D  :# :V  
(F (t ('F 't 'r8   rL   c                   @    \ rS rSrSr\" S5      /r\" S5      /=rrSr	g)r   p   zCExample: `ArgumentParser.add_argument(..., choices=Optional.FILE)`.r,   r-   r2   N
r3   r4   r5   r6   rj   rL   r!   r#   r"   r7   r2   r8   r9   r   r   p   s#    M6NDk*++C)r8   r   c                   D    \ rS rSrSr\" SS5      /r\" SS5      /=rrSr	g)Requiredw   zCExample: `ArgumentParser.add_argument(..., choices=Required.FILE)`.r,   Tr-   r2   Nrq   r2   r8   r9   rs   rs   w   s(    M64 !Dk4011C)r8   rs   rP   c                 X    [        U [        5      (       a  U R                  US5      $ X    $ NrX   )
isinstancedictget)opt_completer@   choice_type2fns      r9   complete2patternr|   ~   s3    ,-- UB' Q3A3OQr8   stringc                 2    [         R                  " SSU 5      $ )z0Replace non-word chars [\W] with underscores [_]z\W_)resubr}   s    r9   wordifyr      s    66%f%%r8   c                    U R                  5        Vs1 s H%  n[        U R                  UR                     5      iM'     nnU R                  R	                  5        VVs1 s H  u  p4[        U5      U;   d  M  UiM     snn$ s  snf s  snnf )z?Get all the publicly-visible subcommands for a given subparser.)_get_subactionsidchoicesdestitems)r   ipublic_parserskvs        r9   get_public_subcommandsr      sm    7:7J7J7LM7L!bQVV,-7LNM++++-I-$!A.1HA-II NIs   ,BB7Bc                    ^^^ [         R                  5        VVs0 s H
  u  p4X4S   _M     snnmU(       a  TR                  U5        S mUUU4S jmT" X5      $ s  snnf )a  
Recursive subcommand parser traversal, returning lists of information on
commands (formatted for output to the completions script).
printing bash helper syntax.

Returns:
  subparsers  : list of subparsers for each parser
  option_strings  : list of options strings for each parser
  compgens  : list of shtab `.complete` functions corresponding to actions
  choices  : list of choices corresponding to actions
  nargs  : list of number of args allowed for each action (if not 0 or 1)
r'   c                 D    [        S U R                  5        5       / 5      $ )z0Flattened list of all `parser`'s option strings.c              3   d   #    U  H&  oR                   [        :w  d  M  UR                  v   M(     g 7fr<   )helpr   option_strings).0opts     r9   	<genexpr>@get_bash_commands.<locals>.get_option_strings.<locals>.<genexpr>   s%     b+ICXXYaMaS+Is   00)sum_get_optional_actions)parsers    r9   get_option_strings-get_bash_commands.<locals>.get_option_strings   s#    b6+G+G+Ib
 	
r8   c                   > / n/ n/ n/ n/ n/ n/ n/ n	/ n
/ n/ n[        U R                  5       5       GH  u  pUR                  [        :X  a  M  [	        US5      (       a0  [        UR                  ST!5      nUR                  U SU SU 35        UR                  (       Ga  [        R                  SU S[        UR                  5       35        / nUR                   GH  n[        U[        5      (       aZ  [        R                  SUR                   SU SUR                   35        UR                  U SU ST!UR                      35        Ms  [        UR                  [         5      (       a  [        R                  SU5        [#        U5      nUU;   a  UR                  [%        U5      5        UR                  [%        U5      5        T#" UR                  U   U S	['        U5       35      u  nnnnnUR)                  U5        UR)                  U5        U	R)                  U5        U
R)                  U5        UR)                  U5        GMo  [        R                  S
U5        GM  UR                  [%        U5      5        GM     U(       a+  SR+                  U5      nUR                  U SU SU S35        UR,                  S;  d  GM  UR                  U SU SUR,                   35        GM     U(       aC  SR+                  U5      nUR                  U SU S35        [        R                  SU SU 35        SR+                  T"" U 5      5      nUR                  U SU S35        U R/                  5        GH  nU[        :X  a  M  UR0                   GH  n[	        US5      (       a9  [        UR                  ST!5      nUR                  U S	['        U5       SU 35        UR                  (       a  / nUR                   H  n[        U[        5      (       ae  [        R                  SUR                   SU SUR                   35        T!UR                     nUR                  U S	['        U5       SU 35        M}  UR                  [%        U5      5        M     U(       a4  SR+                  U5      n UR                  U S	['        U5       SU  S35        UR,                  c  GMS  UR,                  S:w  d  GMf  UR                  U S	['        U5       SUR,                   35        GM     GM     UR)                  U5        UR)                  U5        UR)                  U	5        UR)                  U
5        UR)                  U5        X#XEU4$ )z9recurse through subparsers, appending to the return listsr   r'   _pos_z	_COMPGEN=choices::zChoice.subcommand:%sr   skip:subcommand:%s' 'z_choices=('z'))N1rY   z_nargs=z_subparsers=('zsubcommands:z_option_strings=('r   )	enumerate_get_positional_actionsr   r   hasattrr|   r   r=   r   logdebugsortedrw   rL   rS   r   rx   r   rk   r   extendrG   nargsr   r   )$r   prefix
subparsersr   compgensr   r   sub_subparserssub_option_stringssub_compgenssub_choices	sub_nargsdiscovered_subparsersr   
positionalcomp_patternthis_positional_choiceschoicepublic_cmdsnew_subparsersnew_option_stringsnew_compgensnew_choices	new_nargschoices_strsubparsers_stroptions_strings_stroptionaloption_stringcomp_pattern_strthis_optional_choicesfunc_strthis_choices_strr{   r   recurses$                                    r9   r   "get_bash_commands.<locals>.recurse   s)   
 	 !#&v'E'E'GHMA(*z:../
0C0CV^\6(%s)L> JK!!!		HVHAfZ5G5G.H-IJK*,'(00F!&&11 		GFKK=&:??BS"TU 6(%s)NSYS^S^D_C`(ab#J$6$6==		/6:&<Z&H![0188VE3::3v;G !( * 2 26 :#)(!GFO+< =! . 2 , + )
 +11.A.556HI(//='..{;%,,Y7II&:FC 066s6{CA 1D +"'**-D"EKNNfXU1#[R#PQ '77xuQCwz7G7G6HIJm Ip !"ZZ(=>N~6FbIJIIVHA.C-DEF $jj);F)CD(:;N:OrRS446H8#!)!8!88Z00'78I8I6Sa'b$OO!(!GM$:#;9EUDVWY ##,.)"*"2"2 &ff55II}AfXQx}}o&VW'5fkk'BH$OO#)(!GM,B+C9XJ WY 288VE #3 -+0::6K+L(%ha(>'?{K[J\\^_a >>-(..A2ELLF81W]-C,DGHNNK[!\]; "9	 7H 	.)01%{#Y8eCCr8   )r.   r   update)root_parserroot_prefixchoice_functionsr   r   r{   r   r   s        @@@r9   get_bash_commandsr      s`     0@/E/E/GH/Gtqa6l/GHN./
{Dz ;,,Q Is   Ar'   c                 f   [        SU=(       d    U R                   35      n[        XUS9u  pEpgn[        S5      R	                  SR                  U5      SR                  U5      SR                  U5      SR                  U5      SR                  U5      U(       a  SU-   S-   OSUU R                  S9$ )	zK
Returns bash syntax autocompletion script.

See `complete` for arguments.
_shtab_)r   a  # AUTOMATICALLY GENERATED by `shtab`

${subparsers}

${option_strings}

${compgens}

${choices}

${nargs}

${preamble}
# $1=COMP_WORDS[1]
_shtab_compgen_files() {
  compgen -f -- $1  # files
}

# $1=COMP_WORDS[1]
_shtab_compgen_dirs() {
  compgen -d -- $1  # recurse into subdirs
}

# $1=COMP_WORDS[1]
_shtab_replace_nonword() {
  echo "${1//[^[:word:]]/_}"
}

# set default values (called for the initial parser & any subparsers)
_set_parser_defaults() {
  local subparsers_var="${prefix}_subparsers[@]"
  sub_parsers=${!subparsers_var-}

  local current_option_strings_var="${prefix}_option_strings[@]"
  current_option_strings=${!current_option_strings_var}

  completed_positional_actions=0

  _set_new_action "pos_${completed_positional_actions}" true
}

# $1=action identifier
# $2=positional action (bool)
# set all identifiers for an action's parameters
_set_new_action() {
  current_action="${prefix}_$(_shtab_replace_nonword $1)"

  local current_action_compgen_var=${current_action}_COMPGEN
  current_action_compgen="${!current_action_compgen_var-}"

  local current_action_choices_var="${current_action}_choices[@]"
  current_action_choices="${!current_action_choices_var-}"

  local current_action_nargs_var="${current_action}_nargs"
  if [ -n "${!current_action_nargs_var-}" ]; then
    current_action_nargs="${!current_action_nargs_var}"
  else
    current_action_nargs=1
  fi

  current_action_args_start_index=$(( $word_index + 1 - $pos_only ))

  current_action_is_positional=$2
}

# Notes:
# `COMPREPLY`: what will be rendered after completion is triggered
# `completing_word`: currently typed word to generate completions for
# `${!var}`: evaluates the content of `var` and expand its content as a variable
#     hello="world"
#     x="hello"
#     ${!x} -> ${hello} -> "world"
${root_prefix}() {
  local completing_word="${COMP_WORDS[COMP_CWORD]}"
  local previous_word="${COMP_WORDS[COMP_CWORD-1]}"
  local completed_positional_actions
  local current_action
  local current_action_args_start_index
  local current_action_choices
  local current_action_compgen
  local current_action_is_positional
  local current_action_nargs
  local current_option_strings
  local sub_parsers
  COMPREPLY=()

  local prefix=${root_prefix}
  local word_index=0
  local pos_only=0 # "--" delimeter not encountered yet
  _set_parser_defaults
  word_index=1

  # determine what arguments are appropriate for the current state
  # of the arg parser
  while [ $word_index -ne $COMP_CWORD ]; do
    local this_word="${COMP_WORDS[$word_index]}"

    if [[ $pos_only = 1 || " $this_word " != " -- " ]]; then
      if [[ -n $sub_parsers && " ${sub_parsers[@]} " == *" ${this_word} "* ]]; then
        # valid subcommand: add it to the prefix & reset the current action
        prefix="${prefix}_$(_shtab_replace_nonword $this_word)"
        _set_parser_defaults
      fi

      if [[ " ${current_option_strings[@]} " == *" ${this_word} "* ]]; then
        # a new action should be acquired (due to recognised option string or
        # no more input expected from current action);
        # the next positional action can fill in here
        _set_new_action $this_word false
      fi

      if [[ "$current_action_nargs" != "*" ]] && \
         [[ "$current_action_nargs" != "+" ]] && \
         [[ "$current_action_nargs" != *"..." ]] && \
         (( $word_index + 1 - $current_action_args_start_index - $pos_only >= \
            $current_action_nargs )); then
        $current_action_is_positional && let "completed_positional_actions += 1"
        _set_new_action "pos_${completed_positional_actions}" true
      fi
    else
      pos_only=1 # "--" delimeter encountered
    fi

    let "word_index+=1"
  done

  # Generate the completions

  if [[ $pos_only = 0 && "${completing_word}" == -* ]]; then
    # optional argument started: use option strings
    COMPREPLY=( $(compgen -W "${current_option_strings[*]}" -- "${completing_word}") )
  elif [[ "${previous_word}" == ">" || "${previous_word}" == ">>" ||
          "${previous_word}" =~ ^[12]">" || "${previous_word}" =~ ^[12]">>" ]]; then
    # handle redirection operators
    COMPREPLY=( $(compgen -f -- "${completing_word}") )
  else
    # use choices & compgen
    local IFS=$'\n' # items may contain spaces, so delimit using newline
    COMPREPLY=( $([ -n "${current_action_compgen}" ] \
                  && "${current_action_compgen}" "${completing_word}") )
    unset IFS
    COMPREPLY+=( $(compgen -W "${current_action_choices[*]}" -- "${completing_word}") )
  fi

  return 0
}

complete -o filenames -F ${root_prefix} ${prog}

# Custom Preamble

# End Custom Preamble
rX   )r   r   r   r   r   preambler   prog)r   r   r   r   safe_substituterG   )	r   r   r   r   r   r   r   r   r   s	            r9   complete_bashr   &  s     GK$>6;;#?@AK;L.><@8J5  T3 T4h 5DO99Z(yy08$		'"ii19 *H4-.?A[[ 5D 
5i^r8   c                 D    [         R                  " SS[        U 5      5      $ )Nz([^\w\s.,()-])z\\\1)r   r   rk   r   s    r9   
escape_zshr     s    66#Wc&k::r8   r(   c                 <  ^^^^^^^^ U R                   m[        SU=(       d    T 35      n[        R                  5        VVs0 s H
  u  pEXES   _M     snnmU(       a  TR	                  U5        S mS mUUU4S jmU4S jmUTU R                  5        Vs/ s H   ofR                  [        :w  d  M  T" X`5      PM"     snU R                  5        Vs/ s H0  nUR                  [        :w  d  M  UR                  b  M(  T" X`5      PM2     sn-   U R                  =(       d    SR                  5       R                  S5      S	   / / S
.0mSUUUU4S jjmT" X5        [        TR                  5       5       VVs0 s H3  u  px[        UR                  S/ 5      5      S:  d  M&  Xq:w  d  M-  US   U_M5     snnTU   S'   TR                  5        VVs0 s H  u  pxUR                  S5      (       d  M  Xx_M!     n	nnU	R!                  UTU   5        ["        R%                  SU[        T5      5        S n
S nU4S jnU(       a  SUR'                  5        S3OSn[)        S5      R+                  TUSR-                  [/        U
[        U	R                  5       5      5      5      SR-                  [/        U[        U	R                  5       5      5      5      SR-                  [/        U[        TR                  5       5      5      5      US9$ s  snnf s  snf s  snf s  snnf s  snnf )zJ
Returns zsh syntax autocompletion script.

See `complete` for arguments.
r   r(   c                 V    [        U [        5      =(       d    U R                  [        :H  $ r<   )rw   
OPTION_ENDr   r   r   s    r9   
is_opt_end complete_zsh.<locals>.is_opt_end  s    #z*Dcii9.DDr8   c                 "    [        U [        5      $ r<   )rw   OPTION_MULTIr   s    r9   is_opt_multiline&complete_zsh.<locals>.is_opt_multiline  s    #|,,r8   c                 t  > UR                  5       R                  n[        U [        5      (       a  SOSR	                  T" U 5      (       a  SOT" U 5      (       a  SOS[        U R                  5      S:  a*  SR	                  SR                  U R                  5      5      O)S	R	                  SR                  U R                  5      5      [        U R                  (       a  U" U 5      OS5      U R                  [        U S
5      (       a  [        U R                  ST5      OU R                  (       av  [        U R                  S   [        5      (       a  TU R                  S   R                      O9SR	                  SR                  [#        [$        U R                  5      5      5      OSS9R'                  SS5      $ )Nz{nargs}{options}"[{help}]"z+{nargs}{options}"[{help}]:{dest}:{pattern}"z	"(- : *)"z"*"rX   r   z{{{}}}rE   z"{}"r   r(   r   ({}) )r   optionsr   r   patternz"")_get_formatter_expand_helprw   FLAG_OPTIONformatlenr   rG   r   r   r   r   r|   r   r   rL   rS   maprk   replace)r   r   get_helpr{   r   r   s      r9   format_optional%complete_zsh.<locals>.format_optional  sX   ((*771;2 2-#PRXRX&0oo{DTUXDYDY5_aJMcN`N`JaK#2D2D)EF"(--8J8J0K"LrBXXQXR% R%(unM EHKK 9C3;;q>SY8Z8ZA 3 34sxxC(=>?UW SY 
S gdB	!r8   c                   > UR                  5       R                  nSR                  [        S[        S[
        S0R                  U R                  S5      [        U R                  (       a  U" U 5      OU R                  R                  5       R                  S5      S   5      [        U S5      (       a  [        U R                  S	T5      S9$ U R                   (       a{  [#        U R                   S   [$        5      (       a  TU R                   S   R&                     S9$ S
R                  SR)                  [+        [,        U R                   5      5      5       S9$ SS9$ )Nz"{nargs}:{help}:{pattern}"z(*)z(*):z(-)*rX   r   r   r   r(   r   r   )r   r   r   )r   r   r   r   r   r   ry   r   r   r   r   stripsplitr   r|   r   r   rw   rL   rS   rG   r   rk   )r   r   r   r{   s      r9   format_positional'complete_zsh.<locals>.format_positional  s8   ((*77+22|VYOSSTWT]T]_abchhXc]CHHKKMSSTXYZ[\]MTZN! N!$S\\5.I 3 
 	
 AD 5?s{{1~v4V4V^CKKN//0 3 
 	
 ]]388CS[[$9:; 3 
 	
 RT 3 
 	
r8   rX   r   r   )cmd	argumentsr   commandspathsc           	         >^  U=(       d    / n/ nT R                  5        GH_  nUR                  [        :X  d  UR                  (       d  M+  UR                  (       a  [	        UR                  [
        5      (       d   TU   S   R                  T" UT 5      5        M{  [        R                  SU S[        UR                  5       35        [        U5      nUR                  R                  5        GH  u  pgXe;  a  [        R                  SU5        M#  [        R                  SU5        UR                  5        Vs/ s H"  nUR                  [        :w  d  M  T" UT 5      PM$     n	nU	R                  UU 4S jUR                  5        5       5        UR                  5       n
U
R                  nSU
l        U
R!                  UR"                  =(       d    S5      R%                  5       nXl        U S	['        U5       3nXlR)                  S
5      S   U	/ UQUPS.=nTU'   T" X}/ UQUP5      nU Vs0 s H  nUT;   d  M  TU   S   TU   _M     snUS'   UR                  / UQUP5        [        R                  SXn5        GM     GMb     U$ s  snf s  snf )Nr   r   r   r   r   c              3      >#    U  HE  n[        UR                  [        5      (       a  M$  UR                  [        :w  d  M:  T" UT5      v   MG     g 7fr<   )rw   r   rx   r   r   )r   r   r   r   s     r9   r   0complete_zsh.<locals>.recurse.<locals>.<genexpr>-  sE      %V#FC)#++t< 7@CH@T 7)#v66#Fs   #AA Ai rX   r   r   r   )r   r   r   r   r   r   subcommands:%s:%s)r   r   r   r   rw   rx   r=   r   r   r   r   r   r   r   r   _width_format_textdescriptionr   r   r   )r   r   r   subcmdsr   r   r   	subparserr   r   	formatterbackup_widthdescnew_prefr   new_subcmdsprefall_commandsr   r   r   s   `                r9   r   complete_zsh.<locals>.recurse  sp   113Cxx8#3;;;;jd&C&CV$[1889J3PV9WX		HVHAfS[[.A-BCD4S9&)kk&7&7&9NC-		"6< IIos3 AJ@_@_@a!1@a88x/ 5V4@a  !1
 $$ %V#,#D#D#F%V V !* 8 8 :I#,#3#3L'.I$$11)2G2G2M2NTTVD'3$"(73<.9H"JJt,<Q,?i!.5#80 0Gl84 #*)}}}"MK %0+I$/D4<3G FT*51<3EE$/+IGJ' NN#;[#;(#;<II13@C ': 4V 7!1,+Is   9JJ+
J9Jr      r   r   r   c                 x   US   nUS   nSnSn/ n[        UR                  5       5       HN  u  pqUR                  S5      (       a  UOUnUR                  UR	                  US   [        US   5      U S95        MP     SR                  S5      R                  U5      nU  SU  S	U  S
U  SU  SU SU  SU SU  SU S3$ )Nr   r   z<{name}) _arguments -C -s ${prefix}_{name_wordify}_options ;;z"{name}) {prefix}_{name_wordify} ;;)namename_wordifyr   z
	   zf() {
  local context state line curcontext="$curcontext" one_or_more='(-)*' remainder='(*)'

  if ((${z%_options[(I)${(q)one_or_more}*]} + ${z>_options[(I)${(q)remainder}*]} == 0)); then  # noqa: E501
    z_options+=(': :z_commands' '*::: :->z')
  fi
  _arguments -C -s $z_options

  case $state in
    ze)
      words=($line[1] "${words[@]}")
      (( CURRENT += 1 ))
      curcontext="${curcontext%:*:*}:z+-$line[1]:"
      case $line[1] in
        z
      esac
  esac
}
)r   r   ry   r=   r   r   
expandtabsrG   )	r   r   r  r   case_fmt_on_no_subcase_fmt_on_subcasesr   fmts	            r9   command_case"complete_zsh.<locals>.command_caseP  s   u~:&_B !12JA%,[[%<%</BTCLL

WWU^=T"(  *+ 3
 !!!$))%0  	 (;F8 DHOF8#7v >H  
F ( )/x 0		  	r8   c                 :    SR                  US   5      nU  SU S3$ )Nz
  r   z_options=(
  z
)
)rG   )r   r   r   s      r9   command_option$complete_zsh.<locals>.command_options  s3    KK 45	 	+  	r8   c                    > SR                  T/US   Q5      nSR                  S [        US   R                  5       5       5       5      nSU  SU SU S	3$ )
Nr   r   z
    c              3   b   #    U  H%  u  pS [        U5       S[        US   5       S 3v   M'     g7f)"r   r   N)r   )r   r   r   s      r9   r   5complete_zsh.<locals>.command_list.<locals>.<genexpr>}  s8      !V1TXS $%Z_$5Qz#f+7N6Oq!Q1Ts   -/r   r   z&_commands() {
  local _commands=(
    z
  )
  _describe 'z commands' _commands
})rG   r   r   )r   r   r  r   r   s       r9   command_list"complete_zsh.<locals>.command_list{  s|    xx1 012== !V17
8K8Q8Q8S1T!V V 	J V  	r8   z# Custom Preamble
z

# End Custom Preamble
aj  #compdef ${prog}

# AUTOMATICALLY GENERATED by `shtab`

${command_commands}

${command_options}

${command_cases}
${preamble}

typeset -A opt_args

if [[ $zsh_eval_context[-1] == eval ]]; then
  # eval/source/. command, register function for later
  compdef ${root_prefix} -N ${prog}
else
  # autoload from fpath, call function directly
  ${root_prefix} "$@"
fi
)r   r   command_casescommand_commandscommand_optionsr   r<   )r   r   r.   r   r   r   r   r   r   r   r  r   r   r   r   ry   
setdefaultr   r   rstripr   r   rG   r   )r   r   r   r   r   r   r   r   r   subcommandsr  r  r!  r  r{   r   r   r   r   r   r   s                @@@@@@@@r9   complete_zshr)    s    ;;DGK$74#89:K.>.D.D.FG.Fdaa5k.FGN./E-!	
 	!779'S9CXX=Q -,9'S ?E>\>\>^VE>^sxx8+ 303 3%c2>^VE'E
 '' EEGEE$K3@BRQRL. .` F   &l&8&8&:;-H;OFw{{7B'(1, 	 171F 	 ;-HLj)  ,113P3OFw{{:7N 	3  P ;[(ABII!;|0DE!F
" 	  
     * _iif[=N=N=P6Q RS7<@Q@Q@S9T#UV		'.&ASASAU:V"WX  +[ HN'SVEn-HPsB   LL3LL
/L
>L
7%L L'
LL.Lr)   c                   ^^^^^^^ [        5       m[        5       m/ m[        [        5      m[        R	                  5        VVs0 s H
  u  pEXES   _M     snnmU(       a  TR                  U5        U4S jmSUUUUUU4S jjmT" U S5        TR	                  5        GH#  u  pg[        U5      S:X  a@  [        UR                  5       5      S   nTR                  T" US[        U5      5      5        MU  / n	UR	                  5        H  u  pUR                  (       d  M  [        U
SS9 VVs/ s H  u  pS	U S
U S3PM     nnnSR                  UR                  5      nSR                  USU S3/-   5      nU	R                  SU S35        M     SR                  U	5      nTR                  S[        U5       SU S35        GM&     T(       a  T(       a  TR                  S5        OSm[!        S5      R#                  U(       a  SU-   S-   OSUU R$                  SR                  ['        T5      5      SR                  ['        T5      5      SR                  T5      S9$ s  snnf s  snnf ) z
Return tcsh syntax autocompletion script.

root_prefix:
  ignored (tcsh has no support for functions)

See `complete` for other arguments.
r)   c              3     >#    U R                   (       a8  SR                  [        [        U R                   5      5      nSU SU SU S3v   g [	        U S5      (       a.  [        U R                  ST5      nU(       a  SU SU SU S3v   g g g 7f)	Nr   '/z/(z)/'r   r)   z/')r   rG   r   rk   r   r|   r   )argarg_typearg_selchoice_strscomplete_fnr{   s        r9   get_specials#complete_tcsh.<locals>.get_specials  s     ;;((3sCKK#89KhZq	K=<<S*%%*3<<PK(1WIQ{m2>>  &s   B
Bc           	      
  > SU-  n[         R                  SX15        U(       a'  [         R                  SUSR                  U5      5        O/ nU R                  5        H  n[         R                  SX4R                  5        UR
                  [        :w  d  M9  UR                   H  n[         R                  SX55        UR                  S5      (       a  TR                  USS  5        O*UR                  S	5      (       a  TR                  US
S  5        TR                  T	" USU5      5        M     M     U R                  5        H  nUR
                  [        :w  d  M  US
-  n[         R                  SX1UR                  5        UT
U   [        U5      '   U(       a  MY  [        UR                  [        5      (       d  Mz  UR                  R!                  5        H'  u  px[         R                  SX75        T" XX'/-   5        M)     M     g )Nz| z%sParser @ %dz%s- Requires: %sr   z%s| Optional: %sz%s| | %sz--r  -r   nz%s| Positional #%d: %sz%s| | SubParser: %s)r   r   rG   r   r   r   r   r   
startswithaddr   r   tuplerw   r   rx   r   )cparserpositional_idxrequirements
log_prefixr   optional_strr   subcmdr  r3  index_choicesoptionals_doubleoptionals_singlerecurse_parserspecialss            r9   rD  %complete_tcsh.<locals>.recurse_parser  s   N*
		/:>II(*chh|6LML557HII(*mmD}}($,$;$;LIIj*C#..t44(,,\!"-=>%0055(,,\!"-=>OOL3$MN %<	 8 "99;J(*!#		2JPZP_P_`EOn-eL.AB#|
:3E3Et(L(L-7-?-?-E-E-G)		"7L&y,QYBYZ .H <r8   r   r   pr  )startz[ "$cmd[z]" == "z" ]r   z && zecho 'r,  z( z || false )z || z'p@z@`set cmd=($COMMAND_LINE); z`@'r6  )r6  r6  z# AUTOMATICALLY GENERATED by `shtab`

${preamble}

complete ${prog} \
        'c/--/(${optionals_double_str})/' \
        'c/-/(${optionals_single_str})/' \
        ${optionals_special_str} \
        'p/*/()/'r   r   rX   r   z \
        )r   r   r   optionals_double_stroptionals_single_stroptionals_special_strr<   )setr   rx   r.   r   r   r   listvaluesr   rk   r   r   rG   r=   r9  r   r   r   r   )r   r   r   r   r   r   idxndictr.  nlistnniidxr7  checksr   
checks_str	nlist_strr{   r3  rA  rB  rC  rD  rE  s                    @@@@@@@r9   complete_tcshrW    s3    uuH%M/?/E/E/GH/Gtqa6l/GHN./?[ [< 61#))+
u:?u||~&q)COOLc3s8<= E ;;=;;;LUVX`aLbcLbgaS<LbFc"'**S[["9K!'V}A7N6O-O!PJLL2j\!=> ) E*IOOc#c(+FykQTUV! ,$   %  * 	 	 &o19 *H4-.?AP[[[sxx?O8P/Q XXf-=&>?-228< & >>M In ds   I)I"
r   r   r   r   c                 x    [        U[        5      (       a  UR                  US5      n[        U5      nU" U UUUS9$ )a  
shell:
  bash/zsh/tcsh
root_prefix:
  prefix for shell functions to avoid clashes (default: "_{parser.prog}")
preamble:
  mapping shell to text to prepend to generated script
  (e.g. `{"bash": "_myprog_custom_function(){ echo hello }"}`)
choice_functions:
  *deprecated*

N.B. `parser.add_argument().complete = ...` can be used to define custom
completions (e.g. filenames). See <../examples/pathcomplete.py>.
rX   )r   r   r   )rw   rx   ry   rJ   )r   r@   r   r   r   	completers         r9   r   r     sD      (D!!<<r*e$I)	 r8   parentc                 0   ^ ^  " U U4S jS[         5      nU$ )Nc                   (   > \ rS rSrSU U4S jjrSrg)0completion_action.<locals>.PrintCompletionActioni5  Nc                 b   > [        [        T=(       d    UUTS95        UR                  S5        g )N)r   r   )printr   exit)rT   r   	namespacerN  r   rZ  r   s        r9   __call__9completion_action.<locals>.PrintCompletionAction.__call__6  s$    (6+VVhGHKKNr8   r2   r<   )r3   r4   r5   r6   rb  r7   )rZ  r   s   r9   PrintCompletionActionr]  5  s    	 	r8   rd  )r0   )rZ  r   rd  s   `` r9   completion_actionre  3  s      ; 
 ! r8   r   r   c                     [        U[        5      (       a  U/n[        SU[        X45      S.nUS   S   S:w  a!  UR	                  [        S   SS9  Uc   S5       eU R
                  " U0 UD6  U $ )z
option_string:
  iff positional (no `-` prefix) then `parser` is assumed to actually be
  a subparser (subcommand mode)
parent:
  required in subcommand mode
N)r   defaultr   actionr   r6  rY   )rg  r   z subcommand mode: parent required)rw   rk   r    re  r   add_argument)r   r   r   rZ  r   kwargss         r9   r   r   =  s     -%%&#d#F57F Qc!.q1=!E#EE!
1&1Mr8   r<   )NrX   N)r'   NrX   Nrv   )z--print-completionzprint shell completion scriptNrX   )Dloggingr   argparser   r   r   r   r   r   r	   r
   r   r   r   r   collectionsr   	functoolsr   	itertoolsr   r}   r   typingr   r   r   r   Optr   	_dist_verr   ImportErrorsetuptools_scmr   __file__LookupError__all__	getLoggerr3   r   r    rk   __annotations__r>   r.   r!   r"   r#   r   r0   r   r   rC   rJ   rL   rs   r|   r   r   r   r   r   r)  rW  r   re  r   r2   r8   r9   <module>rz     s    	    $ $   " " "  & Z!  $s)   +HcJ/SQ/S $sDcN*+ S ";/ /	C	& 	 .*EE
0,>M M ' ' '>, ,2 2Q# Q# Q
&C &C &
JU-p m m`;
 R Rj b> b>J SWUY^ C s3x S$sCx.01JMc(^a6 59\^!c.1 !E#tTWTWUX PY KY EZ ! ,@/"&+-d3i(  	
 Cc3h'(C    .!tB%    s*   F% %G,F<<
GG
GG