Mercurial > hg > toybox
comparison toys/which.c @ 233:d4176f3f3835
Zap toys/Config.in and instead create generated/Config.in from contents of
toys/*.c. Move relevant info into comment at the top of each toys/*.c. Also
convert more of Makefile into a thin wrapper around shell scripts that actually
do the work. (Makefile is only still there for the user interface.)
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 19 Jan 2008 17:08:39 -0600 |
parents | 30a6db5a95c2 |
children | 163498bf547b |
comparison
equal
deleted
inserted
replaced
232:cd4d5630c978 | 233:d4176f3f3835 |
---|---|
1 /* vi: set sw=4 ts=4: */ | 1 /* vi: set sw=4 ts=4: |
2 /* | 2 * |
3 * which.c - Find executable files in $PATH. | 3 * which.c - Find executable files in $PATH. |
4 * | 4 * |
5 * Copyright 2006 Rob landley <rob@landley.net> | 5 * Copyright 2006 Rob landley <rob@landley.net> |
6 * | 6 * |
7 * Not in SUSv3. | 7 * Not in SUSv3. |
8 */ | |
9 | 8 |
9 config WHICH | |
10 bool "which" | |
11 default y | |
12 help | |
13 usage: which [-a] filename ... | |
14 | |
15 Search $PATH for executable files matching filename(s). | |
16 | |
17 -a Show all matches | |
18 */ | |
10 #include "toys.h" | 19 #include "toys.h" |
11 | 20 |
12 #define OPT_a 1 | 21 #define OPT_a 1 |
13 | 22 |
14 // Find an exectuable file either at a path with a slash in it (absolute or | 23 // Find an exectuable file either at a path with a slash in it (absolute or |