From db529f06b8129d8f37a61e2026ce5f641b131efb Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 24 Jun 2017 00:55:44 +0200 Subject: [PATCH] type: Use command -a --- share/functions/type.fish | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/share/functions/type.fish b/share/functions/type.fish index 6952c86c3..25ba5953e 100644 --- a/share/functions/type.fish +++ b/share/functions/type.fish @@ -101,11 +101,7 @@ function type --description 'Print the type of a command' if test $multi != yes set paths (command -s -- $i) else - # TODO: This should really be `command -sa`. - for file in $PATH/$i - test -x $file -a ! -d $file - and set paths $paths $file - end + set paths (command -sa -- $i) end for path in $paths set res 0