Turn on -o filenames automatically also with _filedir -d.
This commit is contained in:
parent
57720ee0be
commit
768bbc7858
@ -642,12 +642,12 @@ _filedir()
|
||||
xspec=${1:+"!*.@($1|${1^^})"} || \
|
||||
xspec=${1:+"!*.@($1|$(printf %s $1 | tr '[:lower:]' '[:upper:]'))"}
|
||||
toks=( ${toks[@]-} $( compgen -f -X "$xspec" -- $quoted) )
|
||||
if [ ${#toks[@]} -ne 0 ]; then
|
||||
# Turn on -o filenames; see http://bugs.debian.org/272660#64 for
|
||||
# info about the compgen hack (bash < 4)
|
||||
compopt -o filenames 2>/dev/null || \
|
||||
compgen -f /non-existing-dir/ >/dev/null
|
||||
fi
|
||||
fi
|
||||
if [ ${#toks[@]} -ne 0 ]; then
|
||||
# Turn on -o filenames; see http://bugs.debian.org/272660#64 for info
|
||||
# about the compgen hack (bash < 4)
|
||||
compopt -o filenames 2>/dev/null || \
|
||||
compgen -f /non-existing-dir/ >/dev/null
|
||||
fi
|
||||
|
||||
COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
|
||||
|
Loading…
x
Reference in New Issue
Block a user