Skip to content

Commit

Permalink
ovs-appctl-bashcomp: Use better function to complete file.
Browse files Browse the repository at this point in the history
This commit uses the _filedir function defined in bash_completion
module for file completion.  It will take care of the '/' suffix
for directory.

Signed-off-by: Alex Wang <[email protected]>
  • Loading branch information
yew011 committed Mar 18, 2015
1 parent ac3e3aa commit b6b0e04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion utilities/ovs-appctl-bashcomp.bash
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,9 @@ _ovs_command_complete() {
COMPREPLY=( $(compgen -W "$(echo $_COMP_WORDLIST | tr ' ' '\n' \
| sort -u | sed -e '/NO_EXPAN/d')" -- $cur) )
else
compopt -o nospace
# If there is no completions, just complete on file path.
COMPREPLY=( $(compgen -o filenames -A file -- $cur) )
_filedir
fi
fi
Expand Down

0 comments on commit b6b0e04

Please sign in to comment.