From 09bdc8d6aeaf56eb8d288c352ff7225137755dc2 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 20 Dec 2016 17:13:34 +1300 Subject: Accept all directory names for text completion --- bash/bash_completion.d/_text_filenames.bash | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bash') 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 -- cgit v1.2.3