From 44fa733c7a4948208b003d828cf0ca8c6227cca2 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 1 Jan 2022 11:49:10 +0100 Subject: T4049: add tab completion support for "compare commands" --- etc/bash_completion.d/vyatta-cfg | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'etc') 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:" -- cgit v1.2.3