type: Fix "-a"

This matched _all_ executable commands, where it should only match all
executable commands _with the given name_.

Fixes #4070.
This commit is contained in:
Fabian Homborg 2017-05-26 23:55:47 +02:00
parent 6f6d3ce520
commit 0fc9ec5538

View File

@ -102,7 +102,7 @@ function type --description 'Print the type of a command'
set paths (command -s -- $i)
else
# TODO: This should really be `command -sa`.
for file in $PATH/*
for file in $PATH/$i
test -x $file -a ! -d $file
and set paths $paths $file
end