summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--etc/bash_completion.d/vyatta-op5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/bash_completion.d/vyatta-op b/etc/bash_completion.d/vyatta-op
index 5bcc460..0c75378 100644
--- a/etc/bash_completion.d/vyatta-op
+++ b/etc/bash_completion.d/vyatta-op
@@ -101,7 +101,10 @@ _vyatta_op_debug ()
_vyatta_op_default_expand ()
{
local wc=${#COMP_WORDS[@]}
- if (( wc < 2 )) ||
+ if [[ "${COMP_WORDS[0]}" =~ "/" ]]; then
+ # if we are looking for a directory on the first completion then do directory completions
+ _filedir_xspec
+ elif (( wc < 2 )) ||
[[ $COMP_CWORD -eq 0 ]]; then
_vyatta_op_expand "$@"
else