From 05701a779b97e55728632776475fa6540449cd92 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Sat, 16 Feb 2019 17:14:15 -0800 Subject: [PATCH] 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 --- share/functions/isatty.fish | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/functions/isatty.fish b/share/functions/isatty.fish index 4d91f9b5c..406e5287c 100644 --- a/share/functions/isatty.fish +++ b/share/functions/isatty.fish @@ -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