summaryrefslogtreecommitdiff
path: root/bash_completion
diff options
context:
space:
mode:
authorIgor Murzov <e-mail@date.by>2011-06-26 03:38:20 +0400
committerIgor Murzov <e-mail@date.by>2011-06-26 04:04:53 +0400
commitb13ee019d0eed45107aefdbe550c52aaef2bcc93 (patch)
tree2cf84870f92548fb1d9ef2617e0a1f591bb33922 /bash_completion
parent17a316bfca13dcbd7ac432dc368ef18b35494616 (diff)
downloadbash-completion-b13ee019d0eed45107aefdbe550c52aaef2bcc93.tar.gz
make completions that use _command also work with file names
Diffstat (limited to 'bash_completion')
-rw-r--r--bash_completion3
1 files changed, 2 insertions, 1 deletions
diff --git a/bash_completion b/bash_completion
index 819899ef..e5577e38 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1581,8 +1581,9 @@ _command_offset()
_get_comp_words_by_ref cur
if [[ $COMP_CWORD -eq 0 ]]; then
+ local IFS=$'\n'
compopt -o filenames
- COMPREPLY=( $( compgen -c -- "$cur" ) )
+ COMPREPLY=( $( compgen -d -c -- "$cur" ) )
else
cmd=${COMP_WORDS[0]} compcmd=${COMP_WORDS[0]}
# Do we have full path completion for $cmd?