diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-09-27 01:44:30 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-09-27 01:44:30 +0000 |
commit | 218fa5fb98d1e2dd559f1a7b783010177c84f5b0 (patch) | |
tree | 412d3eb9139c5a4b0cd645418183d78ef89b5059 /bin | |
parent | 0400410a482c8d50a60ba9d085f0e28503bd4bb9 (diff) | |
download | FreeBSD-src-218fa5fb98d1e2dd559f1a7b783010177c84f5b0.zip FreeBSD-src-218fa5fb98d1e2dd559f1a7b783010177c84f5b0.tar.gz |
List valid keywords, ala kill(1), rather than the csh builtin kill, which
tells people to type kill -l, when no valid ones are specified.
Sponsored by: Bright Path Solutions
MFC after: 4 days
Diffstat (limited to 'bin')
-rw-r--r-- | bin/ps/keyword.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 38f9c7e..1ab9253 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -264,8 +264,11 @@ parsefmt(const char *p) } } free(tempstr1); - if (!vhead) - errx(1, "no valid keywords (type ps -L for a list)"); + if (!vhead) { + warnx("no valid keywords; valid keywords:"); + showkey(); + exit(1); + } } static VAR * |