diff options
-rwxr-xr-x | etc/bash_completion.d/vyatta-cfg | 13 | ||||
-rw-r--r-- | functions/interpreter/vyatta-cfg-run | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg index 5750f68..213dad9 100755 --- a/etc/bash_completion.d/vyatta-cfg +++ b/etc/bash_completion.d/vyatta-cfg @@ -325,7 +325,7 @@ vyatta_compare_complete () if [ $COMP_CWORD -eq 1 -a -z "${COMP_WORDS[1]}" ]; then echo echo "Possible completions:" - echo -e " <enter>\tCompare working & active configurations" + echo -e " <Enter>\tCompare working & active configurations" echo -e " saved\t\tCompare working & saved configurations" echo -e " <N>\t\tCompare working with revision N" echo -e " <N> <M>\tCompare revision N with M" @@ -335,14 +335,14 @@ vyatta_compare_complete () elif [ $COMP_CWORD -eq 2 -a -z "${COMP_WORDS[2]}" ]; then if [[ "${COMP_WORDS[1]}" == "saved" ]]; then echo "Possible completions:" - echo -e " <enter>\tCompare working and saved configurations" + echo -e " <Enter>\tCompare working and saved configurations" COMPREPLY=( "" " " ) eval $restore_shopts return fi echo echo "Possible completions:" - echo -e " <enter>\tCompare working revision N" + echo -e " <Enter>\tCompare working revision N" echo -e " <M>\t\tCompare revision N with M" echo -e "\n Revisions:" print_commit_log @@ -377,9 +377,9 @@ vyatta_commit_complete () echo echo "Possible completions:" if [ "${COMP_WORDS[0]}" = "commit" ]; then - echo -e " <enter>\tCommit working configuration" + echo -e " <Enter>\tCommit working configuration" elif [ "${COMP_WORDS[0]}" = "commit-confirm" ]; then - echo -e " <enter>\tCommit, rollback/reboot in 10 minutes if no confirm" + echo -e " <Enter>\tCommit, rollback/reboot in 10 minutes if no confirm" echo -e " <N>\t\tCommit, rollback/reboot in N minutes if no confirm" fi echo -e " comment\tComment for commit log" @@ -635,6 +635,9 @@ vyatta_config_invalid_comp () if [[ $validateret -eq 0 ]]; then echo -en "\nPossible completions:\n" echo -en " <Enter>\tExecute the current command" + elif [[ "$cmd" == "comment" ]];then + echo -en "\nPossible completions:\n" + echo -en " <Enter>\tExecute the current command" else # find broken portion of command for arg in "${expanded_api_args[@]:1}"; do diff --git a/functions/interpreter/vyatta-cfg-run b/functions/interpreter/vyatta-cfg-run index f7b109c..9c01194 100644 --- a/functions/interpreter/vyatta-cfg-run +++ b/functions/interpreter/vyatta-cfg-run @@ -576,7 +576,7 @@ _vyatta_cfg_init () save|load|merge) complete -F vyatta_loadsave_complete ${cmd:0:$pos} ;; discard|confirm) - ;; + complete -F vyatta_single_word_complete ${cmd:0:$pos} ;; run) complete -F vyatta_run_complete ${cmd:0:$pos} ;; loadkey) |