On Friday 02 May 2014 21:31, Tito wrote: > On Friday 02 May 2014 15:42:40 you wrote: > > Tito wrote: > > > > > That's it about PATCH 1. > > > There is still PATCH 2.... > > Your patch searches in PATH for dir/file if dir/file is not executable. > > The normal behavior is to not search PATH if the argument contains a '/'. > > Fixed. Thanks! > > > If you rewrite "which" anyway, you could also change the following points: > > - Remove default PATH, saves some bytes > > It mimics the behavior of debianutils which that being a script > sets PATH (from profile?) in its subshell: > > debian:~/Desktop/SourceCode/new_bb/busybox$ cp /usr/bin/which . > debian:~/Desktop/SourceCode/new_bb/busybox$ nano which (add echo $PATH) > debian:~/Desktop/SourceCode/new_bb/busybox$ unset PATH > debian:~/Desktop/SourceCode/new_bb/busybox$ echo $PATH > > > > debian:~/Desktop/SourceCode/new_bb/busybox$ ./which pippo > > PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin > debian:~/Desktop/SourceCode/new_bb/busybox$ echo $PATH > > > > > - Output message if not found (maybe if DESKTOP) > > > - Return number of commands not found as per man page (Which returns the > > number of failed arguments, or -1 when no `programname´ was given)
Applied, thanks! _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
