diff options
author | Alex Harpin <development@landsofshadow.co.uk> | 2015-07-09 21:06:12 +0100 |
---|---|---|
committer | Alex Harpin <development@landsofshadow.co.uk> | 2015-07-09 21:06:12 +0100 |
commit | b9527aabb93b48f2fa2ab14a7b7678bb0ba49369 (patch) | |
tree | 07960e4d2656de52ed00c02edeaa69dcaa440806 /etc | |
parent | 4f67e65e325c80dac4d51db5cd2765cc492f45f6 (diff) | |
download | vyatta-cfg-b9527aabb93b48f2fa2ab14a7b7678bb0ba49369.tar.gz vyatta-cfg-b9527aabb93b48f2fa2ab14a7b7678bb0ba49369.zip |
vyatta-cfg: updated fix for formatting top level cli merge command
Update to the earlier fix for the formatting issue with the merge
command when listing the available commands at the top level CLI.
The previous commit caused formatting issues with node level commands,
purely aesthetic.
Bug #509 http://bugzilla.vyos.net/show_bug.cgi?id=509
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/bash_completion.d/vyatta-cfg | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg index c87e4d9..0e4b7f8 100755 --- a/etc/bash_completion.d/vyatta-cfg +++ b/etc/bash_completion.d/vyatta-cfg @@ -460,6 +460,7 @@ get_help_text () vyatta_help_text="\\nPossible completions:" local print_node_type=$1 local editlvl=$(cli-shell-api getEditLevelStr) + local node=0; for (( idx = 0; idx < ${#_get_help_text_items[@]}; idx++ )); do vyatta_help_text+="\\n" if (( ${#COMP_WORDS[@]} < 2 )) || @@ -474,11 +475,12 @@ get_help_text () multi) vyatta_help_text+="+ " ;; *) vyatta_help_text+=" " ;; esac + node=1; else vyatta_help_text+="\\x20\\x20" fi fi - if [ ${#_get_help_text_items[idx]} -lt 6 ]; then + if [ ${#_get_help_text_items[idx]} -lt $((6 - $node)) ]; then vyatta_help_text+="${_get_help_text_items[idx]}\\t\\t" elif [ ${#_get_help_text_items[idx]} -lt 13 ]; then vyatta_help_text+="${_get_help_text_items[idx]}\\t" |