diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2011-02-16 15:20:44 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2011-02-16 15:20:44 -0800 |
commit | 5ad82e8c5a23dbf954f9b17c46a3c82a1c143bd6 (patch) | |
tree | d89c26f8ca4ceed6a3de4d6a4f8c69e6504d320d | |
parent | f50994b07821f9bdcda6585061c1aa7602bd67dc (diff) | |
download | vyatta-cfg-5ad82e8c5a23dbf954f9b17c46a3c82a1c143bd6.tar.gz vyatta-cfg-5ad82e8c5a23dbf954f9b17c46a3c82a1c143bd6.zip |
fix for bug 6754
* force all command-line words to be non-options.
-rwxr-xr-x | etc/bash_completion.d/vyatta-cfg | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg index 87aaae3..d3cb36d 100755 --- a/etc/bash_completion.d/vyatta-cfg +++ b/etc/bash_completion.d/vyatta-cfg @@ -52,7 +52,7 @@ vyatta_cli_shell_api () shift fi local outstr - if ! outstr=$(${vyatta_sbindir}/my_cli_shell_api "$@"); then + if ! outstr=$(${vyatta_sbindir}/my_cli_shell_api -- "$@"); then # display the error output (if any) and then fail if [ -n "$outstr" ]; then echo "$outstr" @@ -88,15 +88,17 @@ done show () { + local -a opts=() local -a args=() for arg in "$@"; do if [ "$arg" == "-all" ]; then - args+=('--show-show-defaults') + opts+=('--show-show-defaults') else args+=("$arg") fi done - cli-shell-api showCfg "${args[@]}" | eval "${VYATTA_PAGER:-cat}" + cli-shell-api "${opts[@]}" -- showCfg "${args[@]}" \ + | eval "${VYATTA_PAGER:-cat}" } commit () |