summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-10-04 11:13:42 -0500
committerJohn Southworth <john.southworth@vyatta.com>2011-10-04 11:13:42 -0500
commitac9013cb1957ee9045a2ddce179dd1cb8b1eaa95 (patch)
tree6806a43f8e1a8a97530ba08f2096b5452922037d /etc
parentf628d40205c9d29e955a7f008356bd03238da631 (diff)
downloadvyatta-op-ac9013cb1957ee9045a2ddce179dd1cb8b1eaa95.tar.gz
vyatta-op-ac9013cb1957ee9045a2ddce179dd1cb8b1eaa95.zip
Fix top level completions when there are already words on the line
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 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