summaryrefslogtreecommitdiff
path: root/etc/bash_completion.d/vyatta-cfg
diff options
context:
space:
mode:
Diffstat (limited to 'etc/bash_completion.d/vyatta-cfg')
-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