Add completion for az
This commit is contained in:
parent
67c760dc6e
commit
a247c66611
1 changed files with 21 additions and 0 deletions
21
bashcomp/az.completion
Normal file
21
bashcomp/az.completion
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
_az_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 -o bashdefault -F _az_python_argcomplete "az"
|
||||
Loading…
Add table
Add a link
Reference in a new issue