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|${1^^})"} || \
|
||||||
xspec=${1:+"!*.@($1|$(printf %s $1 | tr '[:lower:]' '[:upper:]'))"}
|
xspec=${1:+"!*.@($1|$(printf %s $1 | tr '[:lower:]' '[:upper:]'))"}
|
||||||
toks=( ${toks[@]-} $( compgen -f -X "$xspec" -- $quoted) )
|
toks=( ${toks[@]-} $( compgen -f -X "$xspec" -- $quoted) )
|
||||||
if [ ${#toks[@]} -ne 0 ]; then
|
fi
|
||||||
# Turn on -o filenames; see http://bugs.debian.org/272660#64 for
|
if [ ${#toks[@]} -ne 0 ]; then
|
||||||
# info about the compgen hack (bash < 4)
|
# Turn on -o filenames; see http://bugs.debian.org/272660#64 for info
|
||||||
compopt -o filenames 2>/dev/null || \
|
# about the compgen hack (bash < 4)
|
||||||
compgen -f /non-existing-dir/ >/dev/null
|
compopt -o filenames 2>/dev/null || \
|
||||||
fi
|
compgen -f /non-existing-dir/ >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
|
COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user