From 79e8f4dc5a595bf5f74e4d58d650f90105927f46 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Tue, 4 Oct 2011 11:13:42 -0500 Subject: Fix top level completions when there are already words on the line --- etc/bash_completion.d/vyatta-op | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc') diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op index 83b2050..22353e1 100644 --- a/etc/bash_completion.d/vyatta-op +++ b/etc/bash_completion.d/vyatta-op @@ -101,7 +101,8 @@ _vyatta_op_debug () _vyatta_op_default_expand () { local wc=${#COMP_WORDS[@]} - if (( wc < 2 )); then + if (( wc < 2 )) || + [[ $COMP_CWORD -eq 0 ]]; then _vyatta_op_expand else # after the first word => cannot be vyatta command so use original default -- cgit v1.2.3