Test for availability of compopt before invoking it in _compopt_o_filenames().
Invoking it there on bash < 4 may cause terminal echo to be turned off for some weird reason (RedHat: #653669).
This commit is contained in:
parent
07f76d8f6c
commit
6934a508ef
@ -613,7 +613,10 @@ _quote_readline_by_ref()
|
||||
# the bash < 4 compgen hack.
|
||||
_compopt_o_filenames()
|
||||
{
|
||||
compopt -o filenames 2>/dev/null || \
|
||||
# We test for compopt availability first because directly invoking it on
|
||||
# bash < 4 at this point may cause terminal echo to be turned off for some
|
||||
# reason, see https://bugzilla.redhat.com/653669 for more info.
|
||||
type compopt &>/dev/null && compopt -o filenames 2>/dev/null || \
|
||||
compgen -f /non-existing-dir/ >/dev/null
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user