
    t                     :   S SK JrJrJrJr  S SKrS SKrS SKrS SKrSSK	J
r
Jr  SSKJrJrJrJrJr  SSK
JrJr  SSKJrJrJrJr  SSKJr  S	\R8                  ;   r\R<                  qS
 r Sr!Sr"\RF                  \RH                  \RJ                  \RL                  \RN                  \RP                  \RR                  4r*\RV                  S 5       r,\RV                  S 5       r- " S S\.5      r/SS jr0S r1 " S S\25      r3 " S S\35      r4\3" 5       r5S\5l6        S r7g)    )absolute_importdivisionprint_functionunicode_literalsN   )
completersmy_shlex)USING_PYTHON2strsys_encoding
ensure_strensure_bytes)FilesCompleterSuppressCompleter)IntrospectiveArgumentParseraction_is_satisfiedaction_is_openaction_is_greedy)	shellcode
_ARC_DEBUGc                      [         (       aM  [        (       a2  U  Vs/ s H%  n[        U[        5      (       a  [	        U5      OUPM'     n n[        U S[        06  g g s  snf )Nfile)_DEBUGr
   
isinstancer   r   printdebug_stream)argsxs     'lib/third_party/argcomplete/__init__.pydebugr       sQ    v= KOO$Qz!S'9'9LOq@$DO$'<' 
 Ps   ,AO   P   c               #      #    [         R                  n [        [        R                  S5      [         l         S v   U [         l        g ! U [         l        f = f7fNw)sysstdoutopenosdevnull)r'   s    r   mute_stdoutr+   %   s6     ZZFbjj#&CJ
V
s   4AA AAAc               #   *  #    [         R                  n [        [        R                  S5      [         l         S v   [         R                  R                  5         U [         l        g ! [         R                  R                  5         U [         l        f = f7fr$   )r&   stderrr(   r)   r*   close)r-   s    r   mute_stderrr/   .   sY     ZZFbjj#&CJ


 	


s   4BA% *B%+BBc                       \ rS rSrSrg)ArgcompleteException8    N)__name__
__module____qualname____firstlineno____static_attributes__r3       r   r1   r1   8   s    r9   r1   c           	        ^^^ Tc  [        U 5      m[        R                  " U SS9mSTl        [        R                  R                  SS5      Tl        / mUUU4S jn  TR                  5       nUTR                  :X  a  SSSTS 4$ TR                  R                  5       T:  a,  [        SUSR                  TR                  S95        U" U5      $ TR                  U5        M  ! [         al    [        STR                   S	R                  TR                  S95        TR                  R                  5       T:  a  U" TR                   5      s $ [#        S
5      ef = f)NT)posix_ARGCOMPLETE_COMP_WORDBREAKS c                   > [        U 5      T-   TR                  R                  5       -
  n[        TR                  [
        [        45      (       a  TR                  TR                  ;   a  US-  nU[        U 5      :  a  [        S5        TR                  U 5        Sn U S U XS  p2SnTR                  b&  TR                  TR                  ;   a  TR                  nXBUTTR                  4$ )Nr   zIn trailing whitespacer=   )leninstreamtellr   stater   bytes
whitespacer    appendquoteslast_wordbreak_pos)wordpoint_in_wordprefixsuffixprequotelexerpointwordss        r   
split_wordsplit_line.<locals>.split_wordC   s    D	E)ENN,?,?,AAekkC<00U[[EDTDT5TQM3t9$*+LLDn}-tN/C;;"u{{ell'B{{H
 0H0HHHr9   rH   zsplit, lexer state: '{s}')sz#split (lexer stopped, state: '{s}')zcUnexpected internal state. Please report this bug at https://github.com/kislyuk/argcomplete/issues.)r?   shlexwhitespace_splitr)   environget
wordbreaks	get_tokeneofr@   rA   r    formatrB   rE   
ValueErrortokenr1   )linerN   rP   rH   rM   rO   s    `  @@r   
split_liner^   ;   sD   }D	KKD)E!Ezz~~&DbIEEI( 	R??$Duyy  2r5$..~~""$-fd$?$F$F$F$UV!$''LL   	R&%++'L'S'SV[VaVa'S'bc~~""$-!%++..*  ,Q  R  R	Rs    &C# A	C# C# #A(EEc                 $    U R                  U5      $ N
startswith)
completionrJ   s     r   default_validatorrd   i   s      ((r9   c            	           \ rS rSrSrSSSSS\" 5       S4S jrS\R                  SSSSS\" 5       4S jr	S r
S	 rS
 rS rS r\S 5       rS rS rS rS rS rS rS rSrg)CompletionFinderl   z
Inherit from this class if you wish to override any of the stages below. Otherwise, use
``argcomplete.autocomplete()`` directly (it's a convenience instance of this class). It has the same signature as
:meth:`CompletionFinder.__call__()`.
NTFc                     Xl         X l        X0l        Uc  [        nX@l        XPl        SU l        0 U l        X`l        Uc"  [        R                  R                  S5      S:g  nXpl        g )NF_ARGCOMPLETE_SUPPRESS_SPACE1)_parseralways_complete_optionsexcluderd   	validatorprint_suppressed
completing_display_completionsdefault_completerr)   rU   rV   append_space)selfargument_parserrl   rm   rn   ro   rr   rs   s           r   __init__CompletionFinder.__init__r   sa    &'>$)I" 0$&!!2::>>*GHCOL(r9   c
           
      z   U R                  XUXgUU	S9  S[        R                  ;  a  g[        (       a   [        R                  " SS5      qUc   [        R                  " SS5      n[        R                  R                  S
S5      n
[        U
5      S	:w  a   [        SR                  U
S95        U" S	5        [        R                  S   n[        [        R                  S   5      n[        U5      n[        X5      u  pnnn[        [        R                  S   5      S	-
  nUUS n[        SR                  U5      SR                  U5      SR                  U5      SR                  U5      SR                  U5      SU5        U R                  UXU5      n[        SU5        UR!                  U
R#                  U5      R%                  [&        5      5        UR)                  5         [        (       a  [
        R)                  5         U" S5        g!   [        R                  q GN= f!   [        S5        U" S	5         GN= f)a  
:param argument_parser: The argument parser to autocomplete on
:type argument_parser: :class:`argparse.ArgumentParser`
:param always_complete_options:
    Controls the autocompletion of option strings if an option string opening character (normally ``-``) has not
    been entered. If ``True`` (default), both short (``-x``) and long (``--x``) option strings will be
    suggested. If ``False``, no option strings will be suggested. If ``long``, long options and short options
    with no long variant will be suggested. If ``short``, short options and long options with no short variant
    will be suggested.
:type always_complete_options: boolean or string
:param exit_method:
    Method used to stop the program after printing completions. Defaults to :meth:`os._exit`. If you want to
    perform a normal exit that calls exit handlers, use :meth:`sys.exit`.
:type exit_method: callable
:param exclude: List of strings representing options to be omitted from autocompletion
:type exclude: iterable
:param validator:
    Function to filter all completions through before returning (called with two string arguments, completion
    and prefix; return value is evaluated as a boolean)
:type validator: callable
:param print_suppressed:
    Whether or not to autocomplete options that have the ``help=argparse.SUPPRESS`` keyword argument set.
:type print_suppressed: boolean
:param append_space:
    Whether to append a space to unique matches. The default is ``True``.
:type append_space: boolean

.. note::
    If you are not subclassing CompletionFinder to override its behaviors,
    use ``argcomplete.autocomplete()`` directly. It has the same signature as this method.

Produces tab completions for ``argument_parser``. See module docs for more info.

Argcomplete only executes actions if their class is known not to have side effects. Custom action classes can be
added to argcomplete.safe_actions, if their values are wanted in the ``parsed_args`` completer argument, or
their execution is otherwise desirable.
)rl   rm   rn   ro   rs   rr   _ARGCOMPLETEN	   r%      wbz)Unable to open fd 8 for writing, quittingr   _ARGCOMPLETE_IFSz%Invalid value for IFS, quitting [{v}])v	COMP_LINE
COMP_POINTz
LINE: {!r}z
POINT: {!r}z
PREQUOTE: {!r}z
PREFIX: {!r}z
SUFFIX: {!r}z
WORDS:z
Returning completions:r   )rv   r)   rU   r   fdopenr   r&   r-   r    rV   r?   rZ   intr   r^   _get_completionswritejoinencoder   flush)rt   ru   rl   exit_methodoutput_streamrm   rn   ro   rs   rr   ifs	comp_line
comp_pointcword_prequotecword_prefixcword_suffix
comp_wordsrG   startcompletionss                       r   __call__CompletionFinder.__call__   s   P 	o`g )[g(9 	 	; +6*!yyC0   "		!T 2 jjnn/8s8q=9@@3@GHNJJ{+	L12
y)	U_`iUvRlJ@R BJJ~./!3'
n##I.$$Z0 ''7%%l3%%l3*	& ++JVhi(+6CHH[188FG6 A_*"zz
ABAs   H
 H" 
H"H:c                 ^   U R                  5       n[        R                  " 5       nSU l        [        (       a  U Vs/ s H  n[        U5      PM     nn [        SUSS  5        [        5          U R                  R                  USS  US9nS S S 5        [        SW5        SU l        U R                  XVU[        5      n
U R                  U
5      n
U R                  XU5      n
U
$ s  snf ! , (       d  f       Nb= f! [         a*  n	[        S[        U	5      [        U	5      S5         S n	A	NS n	A	ff = f)	NTzinvoking parser withr   )	namespacezparsed args:z

exceptionzwhile parsing argsF)_patch_argument_parserargparse	Namespacerp   r
   r   r    r/   rk   parse_known_argsBaseExceptiontyper   collect_completionsfilter_completionsquote_completions)rt   r   r   r   rG   active_parsersparsed_argsrH   aer   s              r   r   !CompletionFinder._get_completions   s   446((*=9CD,t,JD	H(*QR.9LL11*QR.K1X .!$   ..~LZ_`--k:,,[J\]# E   	H-a#a&2FGG	Hs5   C"C8 -C'C8 '
C51C8 8
D, D''D,c                    ^^ / U l         / U l        U mUU4S jmT" U R                  5        [        SU R                   5        [        SU R                  5        U R                   $ )a  
Since argparse doesn't support much introspection, we monkey-patch it to replace the parse_known_args method and
all actions with hooks that tell us which action was last taken or about to be taken, and let us have the parser
figure out which subparsers need to be activated (then recursively monkey-patch those).
We save all active ArgumentParsers to extract all their possible option names later.
c                   > TR                   R                  U 5        TR                  R                  U 5        [        U [        5      (       a  g Sn[
        (       a  [        U5      n[        U[        U R                  40 5      U l        U R                   HW  n[        US5      (       a  M   " UU4S jSUR                  5      nUR                  Ul        UR                  Ul        X2l        MY     g )N(MonkeyPatchedIntrospectiveArgumentParser_orig_classc                   (   > \ rS rSrSU U4S jjrSrg)PCompletionFinder._patch_argument_parser.<locals>.patch.<locals>.IntrospectActioni   Nc                 0  > [        SU 5        [        SXX45        [        SU R                  5        [        SU R                  5        TR                  (       d  U R                  XX4S9  g [	        U R                  [
        R                  5      (       a4  [        S5        T" U R                  US      5        U R                  XX4S9  g U R                  [        ;   a=  U R                  (       d  TR                  R                  U 5        U R                  XX4S9  g g )NzAction stub called onz	args:z	orig class:z	orig callable:)option_stringz:orig class is a subparsers action: patching and running itr   )r    r   _orig_callablerp   
issubclassr   _SubParsersAction_name_parser_mapsafe_actionsoption_stringsvisited_positionalsrE   )rt   parserr   valuesr   	completerpatchs        r   r   YCompletionFinder._patch_argument_parser.<locals>.patch.<locals>.IntrospectAction.__call__!  s    5t<iFRot/?/?@0$2E2EF(33 //6/g'(8(8(:T:TUU!"^_!$"7"7q	"BC //6/g!--=#'#6#6 ) = = D DT J //6/g	 >r9   r3   r`   )r4   r5   r6   r7   r   r8   )r   r   s   r   IntrospectActionr      s    h hr9   r   )r   rE   r   r   r   r
   rC   r   	__class___actionshasattrr   r   r   )r   	classnameactionr   r   r   s       r   r   6CompletionFinder._patch_argument_parser.<locals>.patch  s    ))008$$++F3&"=>>BI}!),	#I0KVM]M]/^`bcF //6=11h hv'7'7 h& &,%5%5"(.%#3 7 *r9   zActive parsers:zVisited positionals:)r   r   rk   r    )rt   r   r   s    @@r   r   'CompletionFinder._patch_argument_parser  s\     !#% 	'	4R 	dll!4!45$d&>&>?"""r9   c                 F   S nUR                  5        HC  nU" UR                  UR                  U5      nU(       d  M*  UR                  U R                  U'   ME     UR
                  R                  5        Vs/ s H  ofR                  U5      (       d  M  UPM     nnU$ s  snf )Nc                    ^ U (       d!  U(       a  UR                  T5      (       a  U$ S$ U R                  SS5      R                  5       nSR                  U4S jU 5       5      $ )Nr=   , c              3   V   >#    U  H  oR                  T5      (       d  M  Uv   M      g 7fr`   ra   ).0r   rJ   s     r   	<genexpr>VCompletionFinder._get_subparser_completions.<locals>.filter_aliases.<locals>.<genexpr>E  s     Aq!LL,@AAqs   )	))rb   replacesplitr   )metavardestrJ   r   s     ` r   filter_aliasesCCompletionFinder._get_subparser_completions.<locals>.filter_aliases?  sQ    #(?(?tGRG R(..0A88AqAAAr9   )_get_subactionsr   r   helprq   choiceskeysrb   )rt   r   r   r   r   subcmd_with_aliasessubcmdr   s           r   _get_subparser_completions+CompletionFinder._get_subparser_completions>  s    	B ,,.F"0l"[""AG))*=> /
 -3NN,?,?,Ae,A&EVEVWcEdv,Ae fs   7BBc                 2   [        U5      S:  d  U R                  SL aG  UR                   Vs/ s H/  n[        U5      R	                  U5      (       d  M$  [        U5      PM1     sn$ UR                   Vs/ s H  n[        U5      S:  d  M  [        U5      PM!     nnUR                   Vs/ s H  n[        U5      S::  d  M  [        U5      PM!     nnU R                  S:X  a  U(       a  U$ U$ U R                  S:X  a  U(       a  U$ U$ / $ s  snf s  snf s  snf )Nr   T   longshort)r?   rl   r   r   rb   )rt   r   r   opt	long_opts
short_optss         r   _include_options!CompletionFinder._include_optionsO  s    |q D$@$@D$H/5/D/Dq/D
SVHbHbcoHpOJsO/Dqq060E0EV0ESTU_Z_0E	V171F1FX1F##c(VW-ojo1F
X''61 )99z9))W4!+:::	 rVXs#   #D
D
4DD*DDc           	        ^ U R                   R                  UR                   Vs/ s HG  nUR                  (       d  M  SR	                  U4S jUR                   5       5      UR
                  /PMI     sn5        / nUR                   H  nU R                  (       dY  [        USS 5      n[        U[        5      (       a  UR                  5       (       a  MM  UR
                  [        R                  :X  a  Mm  U R                  X15      (       d  M  [        U[        R                  5      (       a  M  X@R                  UT5      -  nM     U$ s  snf )Nr   c              3   |   >#    U  H1  n[        U5      R                  T5      (       d  M$  [        U5      v   M3     g 7fr`   )r   rb   )r   r   r   s     r   r   ;CompletionFinder._get_option_completions.<locals>.<genexpr>\  s.     n.CzRS}G_G_`lGm}z!}}.Cs   #<<r   )rq   updater   r   r   r   ro   getattrr   r   suppressr   SUPPRESS_action_allowedr   r   )rt   r   r   r   option_completionsr   s     `   r   _get_option_completions(CompletionFinder._get_option_completionsZ  s   !!((!??'*%% }chhnf.C.Cnnpvp{p{|*'	(
  ooF((#FK>	i):;;	@R@R@T@T;;("3"33''77fh&@&@AA"&;&;FL&QQ" & "!!'s
   E5Ec                 l    UR                   R                  U / 5       H  nX!R                  ;   d  M    g   gNFT)_action_conflictsrV   _seen_non_default_actions)r   r   conflict_actions      r   r    CompletionFinder._action_allowedn  s6      &77;;FBGO"B"BB  H r9   c                    [        SR                  [        UR                  5      UR                  S95        U=(       a    US   UR                  ;   nUR                   Vs/ s H  n[        Xv5      (       d  M  UPM     nnU(       a0  [        U5      S:X  d   S5       e[        SUS   S5        0 U l        / nO	U(       a  U$ Sn	U=(       d    UR                   GHX  n
U
R                  (       dG  [        U
5      (       a  S	n	U	(       d.  [        U
5      (       a  [        U
5      (       d  [        S
U
5        M\  [        SXR                  5        [        U
SS 5      nUcx  U
R                  b@  [        U
[        R                  5      (       d!  [         R"                  " U
R                  5      nO+[        U
[        R                  5      (       d  U R$                  nU(       d  GM  ['        U5      (       a  U" X:XS9 Vs/ s H  nU R)                  X5      (       d  M  UPM     nnU(       a  X]-  n[        U[         R"                  5      (       a8  U R                  R+                  U Vs/ s H  owU
R,                  /PM     sn5        OU R                  R+                  U Vs/ s H  owS/PM     sn5        Oy[        S5        [/        S5       H_  nUR1                  X>5      nUc    OJU R)                  X5      (       d  M1  U R                  R+                  US05        UR3                  U5        Ma     [        SU5        GM[     U$ s  snf s  snf s  snf s  snf )NzActive actions (L={l}): {a})lr   r   r   zexpect at most 1 greedy actionzResetting completions becausezmust consume the next argumentFTSkippingzActivating completion forr   )rJ   r   r   r   r=   zICompleter is not callable, trying the readline completer protocol insteadi'  zCompletions:)r    rZ   r?   active_actionsprefix_charsr   rq   r   r   r   r   r   r   r   r   r   r   ChoicesCompleterrr   callablern   r   r   rangecompleterE   )rt   r   next_positionalr   r   r   
isoptionalr   greedy_actionscomplete_remaining_positionalsactive_actionr   ccompletions_from_callableinext_completions                   r   _complete_active_option(CompletionFinder._complete_active_optionw  s   +22S9N9N5OSYShSh2ij!Ll1o9L9L&L
%+%:%:^%:>Nq>]!%:^~&!+M-MM+ 1>!3DFfg(*D%K).&+Dv/D/DDM //!-00 6:25*=99.Q^B_B_j-8 -}>W>WX{DAI  ((4ZW_WqWq=r=r * ; ;M<Q<Q RI#M83M3MNN $ 6 6IyI&&<E+&=k 1< =kq>>!: 23 =k- 1< 1#@%i1L1LMM 55<<B[ \B[Q]%7%7!8B[ \^ !55<<2K L2KQR2K LN ef"4[*3*<*<\*M*2!>>/HH 55<<or=RS'..? ) nk2_ E` } _P1< !] !Ms$    L68L64L;L;M 
M
c                    / nU" SU5        US   nU" SU5        U R                   (       d"  [        U5      S:  a&  US   UR                  ;   a  XPR                  Xc5      -  nU" SU5        U R	                  5       nU" SU5        [        U[        R                  5      (       a  XPR                  Xs5      -  nU R                  XgX2U5      nU" SU5        U" SU R                  5        U$ )	a  
Visits the active parsers and their actions, executes their completers or introspects them to collect their
option strings. Returns the resulting completions as a list of strings.

This method is exposed for overriding in subclasses; there is no need to use it directly.
zall active parsers:zactive_parser:r   zoptional options:znext_positional:zactive options:zdisplay completions:)rl   r?   r   r   _get_next_positionalr   r   r   r   r  rq   )rt   r   r   r   r    r   active_parserr   s           r   r   $CompletionFinder.collect_completions  s     #^4&r*.''C,=,AlSToYfYsYsFs77TTK!;/335 /2ox'A'ABB::?YYK22=S_3>@-$d&?&?@r9   c                    U R                   S   nU R                  S   nUR                  5       nU(       d  gX:X  a  US   $ Sn[        [	        U5      5       H  nX4   U:X  d  M    O   US-   [	        U5      :  a  X4S-      $ g)z.
Get the next positional action if it exists.
r  Nr   r   )r   r   _get_positional_actionsr   r?   )rt   r	  last_positionalall_positionalsr  s        r   r  %CompletionFinder._get_next_positional  s     ++B/2226'??A+"1%%s?+,A!_4 - q53''"q5))r9   c                    U Vs/ s H  n[        U5      PM     nnU R                  c  [        5       U l        [        U R                  5      nU Vs/ s H$  o"U;  d  M
  UR                  U5      (       a  M"  UPM&     sn$ s  snf s  snf )z
Ensures collected completions are Unicode text, de-duplicates them, and excludes those specified by ``exclude``.
Returns the filtered completions as an iterable.

This method is exposed for overriding in subclasses; there is no need to use it directly.
)r   rm   setadd)rt   r   r   seens       r   r   #CompletionFinder.filter_completions  so     /::kz!}k: <<5DL4<< &L;a4-;LL ; Ms   A?	BB6Bc           	         SnUS:X  a$  U(       a  U Vs/ s H
  oUUS-   S PM     nnUS-  nOUS:X  a  US-  n[         R                  R                  S5      S	:X  a  SnO)US
:X  a#  SnU Vs/ s H  oUR                  S
S5      PM     nnU H'  nU Vs/ s H  oUR                  USU-   5      PM     nnM)     U R                  (       a0  Sn[        U5      S:X  a  US   S   U;  a  US:X  a  US==   S-  ss'   U$ s  snf s  snf s  snf )a  
If the word under the cursor started with a quote (as indicated by a nonempty ``cword_prequote``), escapes
occurrences of that quote character in the completions, and adds the quote to the beginning of each completion.
Otherwise, escapes all characters that bash splits words on (``COMP_WORDBREAKS``), and removes portions of
completions before the first colon if (``COMP_WORDBREAKS``) contains a colon.

If there is only one completion, and it doesn't end with a **continuation character** (``/``, ``:``, or ``=``),
adds a space after the completion.

This method is exposed for overriding in subclasses; there is no need to use it directly.
\r=   r   Nz();<>|&!`$* 	
"'"z"`$!_ARGCOMPLETE_SHELLtcsh'z'\''z=/:r   r  r   )r)   rU   rV   r   rs   r?   )rt   r   r   rG   special_charsr   charcontinuation_charss           r   r   "CompletionFinder.quote_completions  s(     R "CNO;a!3a!7!89;O22Ms"V#M::>>./69Ms" M<GHKq99S'2KKH!DALMA99T4$;7KMK "  "';1$Q);CU)U!R'Nc)N5 P I Ns   C7*C<Dc                 >   US:X  aj  [        U5      u  p4pVnUR                  S[        R                  S   5        U R	                  XdX75      nU V	s/ s H  oU	[        U5      S -   PM     sn	U l        U[        U R                  5      :  a  U R                  U   $ gs  sn	f )as  
Alternate entry point for using the argcomplete completer in a readline-based REPL. See also
`rlcompleter <https://docs.python.org/2/library/rlcompleter.html#completer-objects>`_.
Usage:

.. code-block:: python

    import argcomplete, argparse, readline
    parser = argparse.ArgumentParser()
    ...
    completer = argcomplete.CompletionFinder(parser)
    readline.set_completer_delims("")
    readline.set_completer(completer.rl_complete)
    readline.parse_and_bind("tab: complete")
    result = input("prompt> ")

(Use ``raw_input`` instead of ``input`` on Python 2, or use `eight <https://github.com/kislyuk/eight>`_).
r   N)r^   insertr&   argvr   r?   _rl_matches)
rt   textrB   r   r   r   r   first_colon_posmatchesmatchs
             r   rl_completeCompletionFinder.rl_complete2  s    & A:V`aeVfSN,Oa!-++JnfGNUVgUuS->-?'@ @gVD3t''((##E**  Ws   Bc                     U R                   $ )a  
This function returns a mapping of option names to their help strings for displaying to the user

Usage:

.. code-block:: python

    def display_completions(substitution, matches, longest_match_length):
        _display_completions = argcomplete.autocomplete.get_display_completions()
        print("")
        if _display_completions:
            help_len = [len(x) for x in _display_completions.values() if x]

            if help_len:
                maxlen = max([len(x) for x in _display_completions])
                print("\n".join("{0:{2}} -- {1}".format(k, v, maxlen)
                                for k, v in sorted(_display_completions.items())))
            else:
                print("    ".join(k for k in sorted(_display_completions)))
        else:
            print(" ".join(x for x in sorted(matches)))

        import readline
        print("cli /> {0}".format(readline.get_line_buffer()), end="")
        readline.redisplay()

    ...
    readline.set_completion_display_matches_hook(display_completions)

)rq   )rt   s    r   get_display_completions(CompletionFinder.get_display_completionsP  s    > (((r9   )rq   rk   r"  r   rl   rs   rp   rr   rm   ro   rn   r   )r4   r5   r6   r7   __doc__r   rv   r)   _exitr   r   r   r   r   r   staticmethodr   r  r   r  r   r   r'  r*  r8   r3   r9   r   rf   rf   l   s    
 (,TSWcg"'>;KZ^)  AERTRZRZjnTX#1#3cJ6:#x"	"(  BH:0M$.`<)r9   rf   c                   $    \ rS rSr\S 5       rSrg)ExclusiveCompletionFinderiq  c                     [         R                  X5      (       d  g[        R                  [        R                  4nU R
                  U;   a  gXR                  ;  a  ggr   )rf   r   r   _AppendAction_AppendConstActionr   r   )r   r   append_classess      r   r   )ExclusiveCompletionFinder._action_allowedr  sO    //??"00(2M2MN/999r9   r3   N)r4   r5   r6   r7   r.  r   r8   r3   r9   r   r0  r0  q  s     r9   r0  zV Use this to access argcomplete. See :meth:`argcomplete.CompletionFinder.__call__()`. c                  *    [        S/U Q7S[        06  g)z
Prints **args** to standard error when running completions. This will interrupt the user's command line interaction;
use it to indicate an error condition that is preventing your completer from working.

r   N)r   r   )r   s    r   warnr8    s    
 
$)D)\)r9   r`   )8
__future__r   r   r   r   r)   r&   r   
contextlibr=   r   r	   rS   compatr
   r   r   r   r   r   r   my_argparser   r   r   r   shellintegrationr   rU   r   r-   r   r    BASH_FILE_COMPLETION_FALLBACKBASH_DIR_COMPLETION_FALLBACK_StoreAction_StoreConstAction_StoreTrueAction_StoreFalseActionr2  r3  _CountActionr   contextmanagerr+   r/   	Exceptionr1   r^   rd   objectrf   r0  autocompleter,  r8  r3   r9   r   <module>rI     s   S R $ $ + N N 9 k k '		#zz( !# ! %%**))**&&++%%'    	9 	,R\)C)v C)J 0   !s *r9   