aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash')
-rw-r--r--bash/bash_completion.d/_text_filenames.bash6
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