add new commands to completion

This commit is contained in:
fluzzi 2022-04-04 19:33:47 -03:00
parent 5c9c605184
commit 1f5fe13805
2 changed files with 20 additions and 0 deletions

View File

@ -723,6 +723,11 @@ _conn()
strings="$strings ${profiles[@]}"
fi
fi
if [ "${COMP_WORDS[1]}" = "config" ]; then
if [[ "${COMP_WORDS[2]}" = "--completion" ]] ; then
strings="bash zsh"
fi
fi
COMPREPLY=($(compgen -W "$strings" -- "${COMP_WORDS[3]}"))
fi
}
@ -781,6 +786,11 @@ _conn()
strings="$strings ${profiles[@]}"
fi
fi
if [ "${COMP_WORDS[2]}" = "config" ]; then
if [[ "${COMP_WORDS[3]}" = '--completion' ]] ; then
strings="bash zsh"
fi
fi
compadd "$@" -- `echo $strings`
fi

View File

@ -1322,6 +1322,11 @@ _conn()
strings="$strings ${profiles[@]}"
fi
fi
if [ "${COMP_WORDS[1]}" = "config" ]; then
if [[ "${COMP_WORDS[2]}" = "--completion" ]] ; then
strings="bash zsh"
fi
fi
COMPREPLY=($(compgen -W "$strings" -- "${COMP_WORDS[3]}"))
fi
}
@ -1380,6 +1385,11 @@ _conn()
strings="$strings ${profiles[@]}"
fi
fi
if [ "${COMP_WORDS[2]}" = "config" ]; then
if [[ "${COMP_WORDS[3]}" = '--completion' ]] ; then
strings="bash zsh"
fi
fi
compadd "$@" -- `echo $strings`
fi