mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
isatty: command [ instead of command test
I don't know why but Go users keep having random tools installed into PATH named `test`. Fixes #5665
This commit is contained in:
parent
20c51b7da9
commit
05701a779b
1 changed files with 3 additions and 1 deletions
|
@ -27,5 +27,7 @@ function isatty -d "Tests if a file descriptor is a tty"
|
|||
|
||||
# Use `command test` because `builtin test` doesn't open the regular fd's.
|
||||
# See https://github.com/fish-shell/fish-shell/issues/1228
|
||||
command test -t "$fd"
|
||||
# Too often `command test` is some bogus Go binary, I don't know why. Use [ because
|
||||
# it's less likely to be something surprising. See #5665
|
||||
command [ -t "$fd" ]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue