Use "compopt -o filenames" if available instead of "compgen -f" hack in _cd().
This commit is contained in:
parent
a55f763363
commit
96b1594e4e
@ -1370,7 +1370,9 @@ _cd()
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Enable -o filenames option, see Debian bug #272660
|
# 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
|
compgen -f /non-existing-dir/ >/dev/null
|
||||||
|
|
||||||
# Use standard dir completion if no CDPATH or parameter starts with /,
|
# Use standard dir completion if no CDPATH or parameter starts with /,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user