Bash completions: warn and exit if POSIX mode detected
This commit is contained in:
parent
c9fdce3e3c
commit
216ad265af
@ -13,6 +13,12 @@
|
|||||||
%>
|
%>
|
||||||
# Bash completion script for brew(1)
|
# Bash completion script for brew(1)
|
||||||
|
|
||||||
|
if test -v POSIXLY_CORRECT || test -o posix
|
||||||
|
then
|
||||||
|
echo "Homebrew Bash completions do not work in POSIX mode" 1>&2
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
__brewcomp_words_include() {
|
__brewcomp_words_include() {
|
||||||
local element idx
|
local element idx
|
||||||
for (( idx = 1; idx < COMP_CWORD; idx++ ))
|
for (( idx = 1; idx < COMP_CWORD; idx++ ))
|
||||||
|
|||||||
@ -1,5 +1,11 @@
|
|||||||
# Bash completion script for brew(1)
|
# Bash completion script for brew(1)
|
||||||
|
|
||||||
|
if test -v POSIXLY_CORRECT || test -o posix
|
||||||
|
then
|
||||||
|
echo "Homebrew Bash completions do not work in POSIX mode" 1>&2
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
__brewcomp_words_include() {
|
__brewcomp_words_include() {
|
||||||
local element idx
|
local element idx
|
||||||
for (( idx = 1; idx < COMP_CWORD; idx++ ))
|
for (( idx = 1; idx < COMP_CWORD; idx++ ))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user