From 5138d9598356d6395813ee44d1c3a999298013d8 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Fri, 7 Oct 2011 13:31:55 -0500 Subject: Fix completions for templates using custom completion functions (currently image tools) --- etc/bash_completion.d/vyatta-op | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc/bash_completion.d') 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 -- cgit v1.2.3