MOON
Server: Apache
System: Linux server30c.hostingraja.org 3.10.0-962.3.2.lve1.5.63.el7.x86_64 #1 SMP Fri Oct 8 12:03:35 UTC 2021 x86_64
User: jibhires (1887)
PHP: 8.1.30
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, allow_url_fopen, symlink, escapeshellcmd, pcntl_exec
Upload Files
File: //opt/alt/python38/lib/python3.8/site-packages/click/__pycache__/_bashcomplete.cpython-38.opt-1.pyc
U

�Ww	�@srddlZddlZddlmZddlmZddlmZmZdZ	e�
d�Zdd	�Zd
d�Z
dd
�Zdd�Zdd�ZdS)�N�)�echo)�split_arg_string)�MultiCommand�Optionz�
%(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_]cCs0t�d|�dd��}td|||d���dS)N��-�_z_%s_completion)Z
complete_funcZscript_namesZautocomplete_var�;)�_invalid_ident_char_re�sub�replace�COMPLETION_SCRIPT�strip)�	prog_name�complete_varZcf_name�r�/_bashcomplete.py�get_completion_scripts�
�rcCsv|j||dd�}|j|jrrt|jt�rr|j|j}|j�||d�}|dkrRdS|j|d|dd�|dd�}q|S)NT)�resilient_parsingrr)�parentr)Zmake_context�argsZprotected_args�
isinstance�commandrZget_command)�clirr�ctx�a�cmdrrr�resolve_ctxs rccs�t|||�}|dkrdSg}|rd|dd���sd|jjD](}t|t�sHq8|�|j�|�|j�q8nt|jt	�r�|�|j�
|��|D]}|�|�r�|Vq�dS)Nr)r�isalnumrZparamsrr�extendZoptsZsecondary_optsrZ
list_commands�
startswith)rrr�
incompleter�choicesZparam�itemrrr�get_choices*s

r%cCsnttjd�}ttjd�}|d|�}z||}Wntk
rLd}YnXt||||�D]}t|�q\dS)NZ
COMP_WORDSZ
COMP_CWORDrrT)r�os�environ�int�
IndexErrorr%r)rrZcwordsZcwordrr"r$rrr�do_complete>s

r*cCs0|dkrtt||��dS|dkr,t||�SdS)N�sourceTZcompleteF)rrr*)rrrZcomplete_instrrrr�bashcompleteMs
r,)r&�reZutilsr�parserrZcorerrr�compilerrrr%r*r,rrrr�<module>s