Anselm R. Garbe --> dwm (2007-05-23 13:23:43 +0200): > On Wed, May 23, 2007 at 01:14:12PM +0200, Jukka Salmi wrote: > > > > I'm able to reproduce this problem with a bourne shell on some BSD > > systems; it seems to be a bug in the test(1) code. Maybe you were > > bitten by the same bug. > > > > To make dmenu_path more robust against such problems I'd recommend the > > attached patch. Furthermore it speeds up execution time a little bit > > in case the cache has to be rebuilt because of a changed directory > > (unless it the last directory in the $PATH). > > Thanks! I applied it to the repo, however I'm not totally sure > the use of [ is a good idea. Is [ a symlink to test in any Unix?
Both [ and test are shell builtins in sh and ksh at least on NetBSD, and in bash. And NetBSD also has $ ls -li /bin/[ /bin/test 42532 -r-xr-xr-x 2 root wheel 18583 Apr 25 23:18 /bin/[ 42532 -r-xr-xr-x 2 root wheel 18583 Apr 25 23:18 /bin/test Regards, Jukka -- bashian roulette: $ ((RANDOM%6)) || rm -rf ~
