diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-20 17:13:34 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-20 17:13:34 +1300 |
commit | 09bdc8d6aeaf56eb8d288c352ff7225137755dc2 (patch) | |
tree | 777b460194418591b2698bbb597d01373a9eec43 /bash | |
parent | Return not continue in text filename completion (diff) | |
download | dotfiles-09bdc8d6aeaf56eb8d288c352ff7225137755dc2.tar.gz dotfiles-09bdc8d6aeaf56eb8d288c352ff7225137755dc2.zip |
Accept all directory names for text completion
Diffstat (limited to 'bash')
-rw-r--r-- | bash/bash_completion.d/_text_filenames.bash | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bash/bash_completion.d/_text_filenames.bash b/bash/bash_completion.d/_text_filenames.bash index 853bc641..93ed8969 100644 --- a/bash/bash_completion.d/_text_filenames.bash +++ b/bash/bash_completion.d/_text_filenames.bash @@ -14,6 +14,12 @@ _text_filenames() { # Exclude blanks [[ -n $item ]] || continue + # Accept directories + if [[ -d $item ]] ; then + COMPREPLY[${#COMPREPLY[@]}]=$item + continue + fi + # Exclude files with block, character, pipe, or socket type [[ ! -b $item ]] || continue [[ ! -c $item ]] || continue |