Viewing File: /opt/alt/python38/lib/python3.8/site-packages/click/__pycache__/_bashcomplete.cpython-38.opt-1.pyc

U

Ww	@srddlZddlZddlmZddlmZddlmZmZdZ	e
dZdd	Zd
dZ
dd
ZddZddZdS)N)echo)split_arg_string)MultiCommandOptionz
%(complete_func)s() {
    COMPREPLY=( $( env COMP_WORDS="${COMP_WORDS[*]}" \
                   COMP_CWORD=$COMP_CWORD \
                   %(autocomplete_var)s=complete $1 ) )
    return 0
}

complete -F %(complete_func)s -o default %(script_names)s
z
[^a-zA-Z0-9_]cCs0td|dd}td|||ddS)N-_z_%s_completion)Z
complete_funcZscript_namesZautocomplete_var;)_invalid_ident_char_resubreplaceCOMPLETION_SCRIPTstrip)	prog_namecomplete_varZcf_namer/_bashcomplete.pyget_completion_scripts
rcCsv|j||dd}|j|jrrt|jtrr|j|j}|j||d}|dkrRdS|j|d|dd|dd}q|S)NT)resilient_parsingrr)parentr)Zmake_contextargsZprotected_args
isinstancecommandrZget_command)clirrctxacmdrrrresolve_ctxs rccst|||}|dkrdSg}|rd|ddsd|jjD](}t|tsHq8||j||jq8nt|jt	r||j
||D]}||r|VqdS)Nr)risalnumrZparamsrrextendZoptsZsecondary_optsrZ
list_commands
startswith)rrr
incompleterchoicesZparamitemrrrget_choices*s

r%cCsnttjd}ttjd}|d|}z||}Wntk
rLd}YnXt||||D]}t|q\dS)NZ
COMP_WORDSZ
COMP_CWORDrrT)rosenvironint
IndexErrorr%r)rrZcwordsZcwordrr"r$rrrdo_complete>s

r*cCs0|dkrtt||dS|dkr,t||SdS)NsourceTZcompleteF)rrr*)rrrZcomplete_instrrrrbashcompleteMs
r,)r&reZutilsrparserrZcorerrrcompilerrrr%r*r,rrrr<module>s
	
Back to Directory File Manager