From 8dd2eb05bf75679f9d355feb29dd44916563ffa2 Mon Sep 17 00:00:00 2001 From: Juli Mallett Date: Fri, 27 Sep 2002 01:44:30 +0000 Subject: [PATCH] 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 --- bin/ps/keyword.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index 38f9c7e7003..1ab925345e9 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 *