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 <alexw@nicira.com>
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