Skip to content

Commit 322b263

Browse files
committed
fix(_bashcomp_try_faketty): explicitly check existence of the command
1 parent 109be77 commit 322b263

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bash_completion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,7 @@ _bashcomp_try_faketty()
18221822
{
18231823
if type unbuffer &>/dev/null; then
18241824
unbuffer -p "$@"
1825-
elif script --version 2>&1 | command grep -qF util-linux; then
1825+
elif type script &>/dev/null && script --version 2>&1 | command grep -qF util-linux; then
18261826
# BSD and Solaris "script" do not seem to have required features
18271827
script -qaefc "$*" /dev/null
18281828
else

0 commit comments

Comments
 (0)