summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-10-06 18:00:59 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-06 18:00:59 -0500
commitae92acdfcbbd8959b5ba512d540bd4ca118629a2 (patch)
treed5cbbcf556ef72dd32173505a2167cc5b95ffccc /etc
parentf1646ce564823ac2dbecb9d9ebf861d715701fc8 (diff)
downloadvyatta-cfg-ae92acdfcbbd8959b5ba512d540bd4ca118629a2.tar.gz
vyatta-cfg-ae92acdfcbbd8959b5ba512d540bd4ca118629a2.zip
quote individual elements for the validation string
Diffstat (limited to 'etc')
-rwxr-xr-xetc/bash_completion.d/vyatta-cfg8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg
index 2ee8edc..96cc555 100755
--- a/etc/bash_completion.d/vyatta-cfg
+++ b/etc/bash_completion.d/vyatta-cfg
@@ -724,7 +724,13 @@ vyatta_config_invalid_comp ()
local path=''
local opath=''
local failed=false
- local validate="cli-shell-api validateTmplPath -- $editlvl '${expanded_api_args[@]:1}'"
+ local validate="cli-shell-api validateTmplPath -- $editlvl"
+ for elem in "${expanded_api_args[@]:1}"; do
+ if [[ -z "$elem" ]]; then
+ continue
+ fi
+ validate="$validate '$elem'"
+ done
eval $validate
local validateret=$?
if [[ $validateret -eq 0 ]]; then