register-python-argcomplete version (return code: 0)
_python_argcomplete() {
local IFS=$'\013'
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_SUPPRESS_SPACE=$SUPPRESS_SPACE \
"$1" 8>&1 9>&2 1>/dev/null 2>/dev/null) )
if [[ $? != 0 ]]; then
unset COMPREPLY
elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "$COMPREPLY" =~ [=/:]$ ]]; then
compopt -o nospace
fi
}
complete -o nospace -o default -F _python_argcomplete "version"
register-python-argcomplete --help (return code: 0)
usage: register-python-argcomplete [-h] [--no-defaults]
[--complete-arguments ...] [-s {bash,tcsh}]
executable
Register a Python executable for use with the argcomplete module.
To perform the registration, source the output of this script in your bash shell (quote the output to avoid interpolation).
Example:
$ eval "$(register-python-argcomplete my-favorite-script.py)"
For Tcsh
$ eval `register-python-argcomplete --shell tcsh my-favorite-script.py`
positional arguments:
executable executable to completed (when invoked by exactly this
name)
optional arguments:
-h, --help show this help message and exit
--no-defaults When no matches are generated, do not fallback to
readline's default completion
--complete-arguments ...
arguments to call complete with; use of this option
discards default options
-s {bash,tcsh}, --shell {bash,tcsh}
output code for the specified shell