summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-01 11:49:10 +0100
committerChristian Poessinger <christian@poessinger.com>2022-02-10 21:56:39 +0100
commit4d32d9173ce599a26f9d12a7b5e62b5c0cf13997 (patch)
tree80563a6dddad4b4386def9e761c12ac5f2e36f0e /etc
parent3bd260433c62dd571a53538dae8d367b97b00e37 (diff)
downloadvyatta-cfg-4d32d9173ce599a26f9d12a7b5e62b5c0cf13997.tar.gz
vyatta-cfg-4d32d9173ce599a26f9d12a7b5e62b5c0cf13997.zip
T4049: add tab completion support for "compare commands"1.3.2
(cherry picked from commit 44fa733c7a4948208b003d828cf0ca8c6227cca2)
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/vyatta-cfg6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg
index 0226ed9..b4d6242 100644
--- a/etc/bash_completion.d/vyatta-cfg
+++ b/etc/bash_completion.d/vyatta-cfg
@@ -364,6 +364,12 @@ vyatta_compare_complete ()
COMPREPLY=( "saved " )
eval $restore_shopts
return
+ elif [[ -n "$current_prefix" ]] &&
+ [[ "commands" =~ "$current_prefix" ]] &&
+ [[ $COMP_CWORD -eq 1 ]]; then
+ COMPREPLY=( "commands " )
+ eval $restore_shopts
+ return
elif [ $COMP_CWORD -eq 2 -a -z "${COMP_WORDS[2]}" ]; then
if [[ "saved" =~ "${COMP_WORDS[1]}" ]]; then
echo -e "\nPossible completions:"