OXIESEC PANEL
- Current Dir:
/
/
opt
/
gsutil
/
third_party
/
argcomplete
/
argcomplete
/
__pycache__
Server IP: 2a02:4780:11:1594:0:ef5:22d7:a
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
02/11/2025 08:19:49 AM
rwxr-xr-x
📄
__init__.cpython-39.pyc
785 bytes
02/11/2025 08:19:49 AM
rw-r--r--
📄
completers.cpython-39.pyc
4.96 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
exceptions.cpython-39.pyc
408 bytes
02/11/2025 08:19:49 AM
rw-r--r--
📄
finders.cpython-39.pyc
18.93 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
io.cpython-39.pyc
1.19 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
lexers.cpython-39.pyc
1.55 KB
02/11/2025 08:19:49 AM
rw-r--r--
📄
shell_integration.cpython-39.pyc
6.38 KB
02/11/2025 08:19:49 AM
rw-r--r--
Editing: shell_integration.cpython-39.pyc
Close
a �\gi � @ s8 d dl mZ dZdZdZdZeeeed�Zdd d�Zd S ) � ��quotea� #compdef %(executables)s # Run something, muting output or redirecting it to the debug stream # depending on the value of _ARC_DEBUG. # If ARGCOMPLETE_USE_TEMPFILES is set, use tempfiles for IPC. __python_argcomplete_run() { if [[ -z "${ARGCOMPLETE_USE_TEMPFILES-}" ]]; then __python_argcomplete_run_inner "$@" return fi local tmpfile="$(mktemp)" _ARGCOMPLETE_STDOUT_FILENAME="$tmpfile" __python_argcomplete_run_inner "$@" local code=$? cat "$tmpfile" rm "$tmpfile" return $code } __python_argcomplete_run_inner() { if [[ -z "${_ARC_DEBUG-}" ]]; then "$@" 8>&1 9>&2 1>/dev/null 2>&1 </dev/null else "$@" 8>&1 9>&2 1>&9 2>&1 </dev/null fi } _python_argcomplete%(function_suffix)s() { local IFS=$'\013' local script="%(argcomplete_script)s" if [[ -n "${ZSH_VERSION-}" ]]; then local completions completions=($(IFS="$IFS" \ COMP_LINE="$BUFFER" \ COMP_POINT="$CURSOR" \ _ARGCOMPLETE=1 \ _ARGCOMPLETE_SHELL="zsh" \ _ARGCOMPLETE_SUPPRESS_SPACE=1 \ __python_argcomplete_run ${script:-${words[1]}})) local nosort=() local nospace=() if is-at-least 5.8; then nosort=(-o nosort) fi if [[ "${completions-}" =~ ([^\\]): && "${match[1]}" =~ [=/:] ]]; then nospace=(-S '') fi _describe "${words[1]}" completions "${nosort[@]}" "${nospace[@]}" else local SUPPRESS_SPACE=0 if compopt +o nospace 2> /dev/null; then SUPPRESS_SPACE=1 fi COMPREPLY=($(IFS="$IFS" \ COMP_LINE="$COMP_LINE" \ COMP_POINT="$COMP_POINT" \ COMP_TYPE="$COMP_TYPE" \ _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" \ _ARGCOMPLETE=1 \ _ARGCOMPLETE_SHELL="bash" \ _ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE \ __python_argcomplete_run ${script:-$1})) if [[ $? != 0 ]]; then unset COMPREPLY elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "${COMPREPLY-}" =~ [=/:]$ ]]; then compopt -o nospace fi fi } if [[ -z "${ZSH_VERSION-}" ]]; then complete %(complete_opts)s -F _python_argcomplete%(function_suffix)s %(executables)s else # When called by the Zsh completion system, this will end with # "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise, # the script was "eval"-ed so use "compdef" to register it with the # completion system autoload is-at-least if [[ $zsh_eval_context == *func ]]; then _python_argcomplete%(function_suffix)s "$@" else compdef _python_argcomplete%(function_suffix)s %(executables)s fi fi zVcomplete "%(executable)s" 'p@*@`python-argcomplete-tcsh "%(argcomplete_script)s"`@' ; a5 function __fish_%(function_name)s_complete set -x _ARGCOMPLETE 1 set -x _ARGCOMPLETE_DFS \t set -x _ARGCOMPLETE_IFS \n set -x _ARGCOMPLETE_SUPPRESS_SPACE 1 set -x _ARGCOMPLETE_SHELL fish set -x COMP_LINE (commandline -p) set -x COMP_POINT (string length (commandline -cp)) set -x COMP_TYPE if set -q _ARC_DEBUG %(argcomplete_script)s 8>&1 9>&2 1>&9 2>&1 else %(argcomplete_script)s 8>&1 9>&2 1>/dev/null 2>&1 end end complete %(completion_arg)s %(executable)s -f -a '(__fish_%(function_name)s_complete)' a� Register-ArgumentCompleter -Native -CommandName %(executable)s -ScriptBlock { param($commandName, $wordToComplete, $cursorPosition) $completion_file = New-TemporaryFile $env:ARGCOMPLETE_USE_TEMPFILES = 1 $env:_ARGCOMPLETE_STDOUT_FILENAME = $completion_file $env:COMP_LINE = $wordToComplete $env:COMP_POINT = $cursorPosition $env:_ARGCOMPLETE = 1 $env:_ARGCOMPLETE_SUPPRESS_SPACE = 0 $env:_ARGCOMPLETE_IFS = "`n" $env:_ARGCOMPLETE_SHELL = "powershell" %(argcomplete_script)s 2>&1 | Out-Null Get-Content $completion_file | ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, "ParameterValue", $_) } Remove-Item $completion_file, Env:\_ARGCOMPLETE_STDOUT_FILENAME, Env:\ARGCOMPLETE_USE_TEMPFILES, Env:\COMP_LINE, Env:\COMP_POINT, Env:\_ARGCOMPLETE, Env:\_ARGCOMPLETE_SUPPRESS_SPACE, Env:\_ARGCOMPLETE_IFS, Env:\_ARGCOMPLETE_SHELL } )�bash�tcsh�fish� powershellTr Nc C s@ |du r|rdnd}n d� |�}|dks0|dkrxdd� | D �}d� |�}|}|rZd | } nd }d } tt|||| d� } n�|dkr�d } | D ]@}|p�|}d |v r�dnd}|�d d �} | tt|||| d� 7 } q�np|dk�rd } | D ] }|p�|}| tt||d� 7 } q�n:d } | D ]0}|}|�s|}| t�|d �t||d� 7 } �q | S )a� Provide the shell code required to register a python executable for use with the argcomplete module. :param list(str) executables: Executables to be completed (when invoked exactly with this name) :param bool use_defaults: Whether to fallback to readline's default completion when no matches are generated (affects bash only) :param str shell: Name of the shell to output code for :param complete_arguments: Arguments to call complete with (affects bash only) :type complete_arguments: list(str) or None :param argcomplete_script: Script to call complete with, if not the executable to complete. If supplied, will be used to complete *all* passed executables. :type argcomplete_script: str or None Nz$-o nospace -o default -o bashdefaultz-o nospace -o bashdefault� r �zshc S s g | ]}t |��qS � r )�.0�ir r �D/opt/gsutil/third_party/argcomplete/argcomplete/shell_integration.py� <listcomp>� � zshellcode.<locals>.<listcomp>�_� )Z complete_opts�executables�argcomplete_script�function_suffixr �/z--pathz --command)� executabler �completion_arg� function_namer )r r )�join�bashcode�dict�replace�fishcode�powershell_code�shell_codes�get)r Zuse_defaults�shellZcomplete_argumentsr Zcomplete_optionsZquoted_executablesZexecutables_list�scriptr �coder r r r r r � shellcode� sR � � r$ )Tr NN)�shlexr r Ztcshcoder r r r$ r r r r �<module> s S