diff options
author | axel <axel@liljencrantz.se> | 2006-03-17 23:22:56 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2006-03-17 23:22:56 +1000 |
commit | 580ec2688533589b83ccc018529818bf7cd4ce15 (patch) | |
tree | efcf02faa6156462c9ace3ed89d82b23897c320b /share/functions/type.fish | |
parent | 6ba5d80a20317f3b7764b7ad0242e9ed73c11fa6 (diff) |
Minor code tweak in type function, and add a missing newline to an output string
darcs-hash:20060317132256-ac50b-87c066ec3aba2eded333ecbf2198de001c313570.gz
Diffstat (limited to 'share/functions/type.fish')
-rw-r--r-- | share/functions/type.fish | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/share/functions/type.fish b/share/functions/type.fish index f8454847..c0b67098 100644 --- a/share/functions/type.fish +++ b/share/functions/type.fish @@ -106,9 +106,7 @@ function type -d (N_ "Print the type of a command") end set -l path (which $i ^/dev/null) - set -l path_ok 0 - count $path >/dev/null; and test -x $path; and set -l path_ok 1 - if test $path_ok = 1 + if test -x (echo $path) set status 0 set found 1 switch $mode @@ -127,7 +125,7 @@ function type -d (N_ "Print the type of a command") end if test $found = 0 - printf (_ "%s: Could not find '%s'") type $i + printf (_ "%s: Could not find '%s'\n") type $i end end |