summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-08-15 16:54:58 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-08-15 16:54:58 -0500
commit59004bc45f055cc9a950f324c36f6cc7df60d9c3 (patch)
tree8cdd027b24091b8efa990551aec24ba497313110
parent030527ef55d5f91f6412c3e716a87c517bccab62 (diff)
downloadvyatta-cfg-59004bc45f055cc9a950f324c36f6cc7df60d9c3.tar.gz
vyatta-cfg-59004bc45f055cc9a950f324c36f6cc7df60d9c3.zip
Allow config mode completion to work when not at the end of the string
-rwxr-xr-xetc/bash_completion.d/vyatta-cfg2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/bash_completion.d/vyatta-cfg b/etc/bash_completion.d/vyatta-cfg
index 587df1e..cacf365 100755
--- a/etc/bash_completion.d/vyatta-cfg
+++ b/etc/bash_completion.d/vyatta-cfg
@@ -552,7 +552,7 @@ vyatta_config_complete ()
return
fi
- local -a api_args=("${COMP_WORDS[@]}")
+ local -a api_args=("${COMP_WORDS[@]:0:$[$COMP_CWORD+1]}")
# handle "copy" and "rename"
if [ "$command" == "copy" -o "$command" == "rename" ]; then