summaryrefslogtreecommitdiff
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:31:55 -0500
commitd920d3d2607f473c9e0d31cc77794580adb71e08 (patch)
tree557ee7234c6b0626480acd2cc35db12cec6b033a
parent12336898f7f0424955e9333df5da536a36278a59 (diff)
downloadvyatta-op-d920d3d2607f473c9e0d31cc77794580adb71e08.tar.gz
vyatta-op-d920d3d2607f473c9e0d31cc77794580adb71e08.zip
Fix completions for templates using custom completion functions (currently image tools)
-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