summaryrefslogtreecommitdiff
path: root/etc/bash_completion.d
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@vyatta.com>2007-10-03 10:34:09 -0700
committerTom Grennan <tgrennan@vyatta.com>2007-10-03 10:34:09 -0700
commitdfd86634b5e470868fea1a370c7563e6060cd207 (patch)
tree113296fafa8d19b581ccec3e4f68e0e5124c42c4 /etc/bash_completion.d
parent613ffa56d28ba653c9d7917f6e9f1f2bd108ac97 (diff)
downloadvyatta-op-dfd86634b5e470868fea1a370c7563e6060cd207.tar.gz
vyatta-op-dfd86634b5e470868fea1a370c7563e6060cd207.zip
quote help string evaluation to allow use of special chars like [] in string
Diffstat (limited to 'etc/bash_completion.d')
-rw-r--r--etc/bash_completion.d/vyatta-op8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op
index 61d8cf5..fe402ef 100644
--- a/etc/bash_completion.d/vyatta-op
+++ b/etc/bash_completion.d/vyatta-op
@@ -225,9 +225,9 @@ _vyatta_op_print_help ()
echo -en "\nPossible completions:"
for (( idx = 0 ; idx < ${#comps[@]} ; idx++ )) ; do
if [ ${#comps[idx]} -lt $taglen ] ; then
- printf "\n %-${taglen}s\t${helps[idx]}" ${comps[idx]}
+ printf "\n %-${taglen}s\t%s" "${comps[idx]}" "${helps[idx]}"
else
- printf "\n %s\n\t\t${helps[idx]}" ${comps[idx]}
+ printf "\n %s\n\t\t%s" "${comps[idx]}" "${helps[idx]}"
fi
done
}
@@ -250,7 +250,7 @@ _vyatta_op_help ()
eval $restore_shopts
if [ -f $subtag ]; then
allowed=($( eval "$( _vyatta_op_get_node_def_field $subtag allowed )" ))
- eval help=$( _vyatta_op_get_node_def_field $subtag help )
+ eval help="$( _vyatta_op_get_node_def_field $subtag help )"
if [ ${#allowed[@]} -ne 0 ] ; then
for a in "${allowed[@]}"; do
hcomps+=( "$a" )
@@ -261,7 +261,7 @@ _vyatta_op_help ()
if [ ${#subnodes[@]} -ne 0 ] ; then
for n in ${subnodes[@]} ; do
- eval help=$( _vyatta_op_get_node_def_field $n help )
+ eval help="$( _vyatta_op_get_node_def_field $n help )"
subdir=${n%/node.def}
hcomps+=( "${subdir##*/}" )
hstrs+=( "$help" )