summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-10-07 13:31:55 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-07 13:32:37 -0500
commit5138d9598356d6395813ee44d1c3a999298013d8 (patch)
tree8e4a93b9c95ec7b07a25dc04a39ecf7022f24535 /etc
parent4f4c9058b537434ed3cbe51f1d957dd2fc9bd363 (diff)
downloadvyatta-op-5138d9598356d6395813ee44d1c3a999298013d8.tar.gz
vyatta-op-5138d9598356d6395813ee44d1c3a999298013d8.zip
Fix completions for templates using custom completion functions (currently image tools)
Diffstat (limited to 'etc')
-rw-r--r--etc/bash_completion.d/vyatta-op3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op
index 815b264..2f50214 100644
--- a/etc/bash_completion.d/vyatta-op
+++ b/etc/bash_completion.d/vyatta-op
@@ -413,7 +413,8 @@ _vyatta_op_expand ()
# This is non obvious...
# To have completion continue to work when working with words that aren't the last word,
# we have to set nospace at the beginning of this script and then append the spaces here.
- if [ ${#COMPREPLY[@]} -eq 1 ];then
+ if [ ${#COMPREPLY[@]} -eq 1 ] &&
+ [[ $_has_comptype -ne 1 ]]; then
COMPREPLY=( "${COMPREPLY[0]} " )
fi
# if there are no completions then handle invalid commands