summaryrefslogtreecommitdiff
path: root/usr.bin/top/display.c
diff options
context:
space:
mode:
authorkn <kn@cvs.openbsd.org>2018-11-28 22:00:31 +0000
committerkn <kn@cvs.openbsd.org>2018-11-28 22:00:31 +0000
commit606b751053bd67b44741b3f1d328787297e8aaae (patch)
tree7e1723d3259478b44c63e791e5934c2fec4e558d /usr.bin/top/display.c
parent80e8dc680c8a080b8cc107f90f1bfc3a57855a07 (diff)
Allow reverse sort order
Prefixing the field with a dash will sort processes in reverse order. `o -pid' will therefore list PID 1 on top. "looks good" tedu, improvements and OK cheloha
Diffstat (limited to 'usr.bin/top/display.c')
-rw-r--r--usr.bin/top/display.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/top/display.c b/usr.bin/top/display.c
index 78d42793fed..0c4a1daeb12 100644
--- a/usr.bin/top/display.c
+++ b/usr.bin/top/display.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: display.c,v 1.57 2018/11/17 23:10:08 cheloha Exp $ */
+/* $OpenBSD: display.c,v 1.58 2018/11/28 22:00:30 kn Exp $ */
/*
* Top users/processes display for Unix
@@ -817,7 +817,8 @@ show_help(void)
"I | i - toggle the display of idle processes\n"
"k [-sig] pid - send signal `-sig' to process `pid'\n"
"n|# count - show `count' processes\n"
- "o field - specify sort order (size, res, cpu, time, pri, pid, command)\n"
+ "o [-]field - specify sort order (size, res, cpu, time, pri, pid, command)\n"
+ " (o -field sorts in reverse)\n"
"P pid - highlight process `pid' (P+ switches highlighting off)\n"
"p pid - display process by `pid' (p+ selects all processes)\n"
"q - quit\n"