diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-10-04 11:13:42 -0500 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-10-04 11:14:39 -0500 |
commit | 79e8f4dc5a595bf5f74e4d58d650f90105927f46 (patch) | |
tree | 07afd4f3cbbfcf4fee468d699dd85f3e40a7a569 /etc/bash_completion.d | |
parent | f84ee28f0dd76e00ed6e44d0adcd10a7699676e8 (diff) | |
download | vyatta-op-79e8f4dc5a595bf5f74e4d58d650f90105927f46.tar.gz vyatta-op-79e8f4dc5a595bf5f74e4d58d650f90105927f46.zip |
Fix top level completions when there are already words on the line
Diffstat (limited to 'etc/bash_completion.d')
-rw-r--r-- | etc/bash_completion.d/vyatta-op | 3 |
1 files changed, 2 insertions, 1 deletions
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 |