The man page says that which(1) works with unset PATH environment
variable, as long as the argument is a pathname. However:

$ unset PATH
$ /usr/bin/which /usr/bin/which
which: can't get $PATH from environment: Undefined error: 0

Index: usr.bin/which/which.1
===================================================================
RCS file: /cvs/src/usr.bin/which/which.1,v
retrieving revision 1.24
diff -u -p -r1.24 which.1
--- usr.bin/which/which.1       14 Aug 2013 06:32:30 -0000      1.24
+++ usr.bin/which/which.1       14 Jan 2016 00:21:45 -0000
@@ -58,8 +58,7 @@ The following environment variables affe
 A colon-separated list of directories in which to find executables.
 If
 .Ev PATH
-is not set, and the given name is not a fully qualified
-or relative pathname,
+is not set,
 .Nm
 will fail.
 .El

Reply via email to