mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
ps: Add the -A
option
This is identical to our existing `-e` option, but both are required by POSIX.
This commit is contained in:
parent
02ee93d6c9
commit
afb55d9fd8
Notes:
sideshowbarker
2024-07-16 23:05:02 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/afb55d9fd8 Pull-request: https://github.com/SerenityOS/serenity/pull/18856 Reviewed-by: https://github.com/awesomekling
2 changed files with 4 additions and 3 deletions
|
@ -5,7 +5,7 @@ ps - list currently running processes
|
|||
## Synopsis
|
||||
|
||||
```**sh
|
||||
$ ps [--version] [-e] [-f] [-q pid-list]
|
||||
$ ps [--version] [-A] [-e] [-f] [-q pid-list]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
@ -15,7 +15,7 @@ For each process, print its PID (process ID), to which TTY it belongs, and invok
|
|||
|
||||
## Options
|
||||
|
||||
* `-e`: Consider all processes, not just those in the current TTY.
|
||||
* `-A` or `-e`: Consider all processes, not just those in the current TTY.
|
||||
* `-f`: Also print for each process: UID (as resolved username), PPID (parent PID), and STATE (Runnable, Sleeping, Selecting, Reading, etc.)
|
||||
* `-q pid-list`: Only consider the given PIDs, if they exist.
|
||||
|
||||
|
|
|
@ -58,7 +58,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
StringView pid_list;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.add_option(every_process_flag, "Show every process", nullptr, 'e');
|
||||
args_parser.add_option(every_process_flag, "Show every process", nullptr, 'A');
|
||||
args_parser.add_option(every_process_flag, "Show every process (Equivalent to -A)", nullptr, 'e');
|
||||
args_parser.add_option(full_format_flag, "Full format", nullptr, 'f');
|
||||
args_parser.add_option(pid_list, "A comma-separated list of PIDs. Only processes matching those PIDs will be selected", nullptr, 'q', "pid-list");
|
||||
args_parser.parse(arguments);
|
||||
|
|
Loading…
Reference in a new issue