diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-10-06 18:00:59 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-10-06 18:00:59 -0500 |
commit | ae92acdfcbbd8959b5ba512d540bd4ca118629a2 (patch) | |
tree | d5cbbcf556ef72dd32173505a2167cc5b95ffccc /etc | |
parent | f1646ce564823ac2dbecb9d9ebf861d715701fc8 (diff) | |
download | vyatta-cfg-ae92acdfcbbd8959b5ba512d540bd4ca118629a2.tar.gz vyatta-cfg-ae92acdfcbbd8959b5ba512d540bd4ca118629a2.zip |
quote individual elements for the validation string
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/bash_completion.d/vyatta-cfg | 8 |
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 |