diff scripts/miscellaneous/ls_command.m @ 11300:4ecc7bc5bc83

search PATH from environment for programs, not EXEC_PATH
author John W. Eaton <jwe@octave.org>
date Fri, 26 Nov 2010 02:58:16 -0500
parents 95c3e38098bf
children fd0a3ac60b0e
line wrap: on
line diff
--- a/scripts/miscellaneous/ls_command.m
+++ b/scripts/miscellaneous/ls_command.m
@@ -32,7 +32,8 @@
 
   if (isempty (__ls_command__))
     ## FIXME -- ispc and isunix both return true for Cygwin.  Should they?
-    if (ispc () && ! isunix () && isempty (file_in_path (EXEC_PATH, "ls")))
+    if (ispc () && ! isunix ()
+        && isempty (file_in_path (getenv ("PATH"), "ls")))
       __ls_command__ = "cmd /C dir /D";
     else
       __ls_command__ = "ls -C";