34 lines
876 B
Diff
34 lines
876 B
Diff
This allows to use COMP_FILEDIR_FALLBACK=yes even if
|
|
local sub directories exists (boo#977336)
|
|
|
|
---
|
|
bash_completion | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
--- bash_completion
|
|
+++ bash_completion 2016-12-14 10:44:34.717186388 +0000
|
|
@@ -564,11 +564,6 @@ _filedir()
|
|
local -a toks
|
|
local x tmp
|
|
|
|
- x=$( compgen -d -- "$cur" ) &&
|
|
- while read -r tmp; do
|
|
- toks+=( "$tmp" )
|
|
- done <<< "$x"
|
|
-
|
|
if [[ "$1" != -d ]]; then
|
|
local quoted
|
|
_quote_readline_by_ref "$cur" quoted
|
|
@@ -589,6 +584,11 @@ _filedir()
|
|
done <<< "$x"
|
|
fi
|
|
|
|
+ x=$( compgen -d -- "$cur" ) &&
|
|
+ while read -r tmp; do
|
|
+ toks+=( "$tmp" )
|
|
+ done <<< "$x"
|
|
+
|
|
if [[ ${#toks[@]} -ne 0 ]]; then
|
|
# 2>/dev/null for direct invocation, e.g. in the _filedir unit test
|
|
compopt -o filenames 2>/dev/null
|