diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-10-06 01:01:36 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-10-06 01:02:22 -0500 |
commit | 704c3d4f68c64380c10f7da4f4914b882f416101 (patch) | |
tree | 5e0de0e2c8657626484f259e9df139f06661a406 | |
parent | 790c6d2b98b73d485ce091f86726516d0193a3f9 (diff) | |
download | vyatta-op-704c3d4f68c64380c10f7da4f4914b882f416101.tar.gz vyatta-op-704c3d4f68c64380c10f7da4f4914b882f416101.zip |
fix help text printing when the command is runnable
-rw-r--r-- | etc/bash_completion.d/vyatta-op | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index 16e25b0..19f2519 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -148,6 +148,9 @@ _vyatta_op_help () _vyatta_op_print_help '<Enter>' "Execute the current command" fi for comp ; do + if [[ "$comp" == "<Enter>" ]]; then + continue + fi if [ -z "$comp" ] ; then if [ "X$node_tag_help" == "X$last_help" ] ; then help="" @@ -168,11 +171,7 @@ _vyatta_op_help () else last_help=$help fi - if [[ "$comp" == "<Enter>" ]]; then - continue - else - _vyatta_op_print_help "$comp" "$help" - fi + _vyatta_op_print_help "$comp" "$help" fi done } |