nc: Sort command line arguments alphabetically

This commit is contained in:
Fabian Dellwing 2023-04-14 11:34:16 +02:00 committed by Andrew Kaster
parent f61947fa9e
commit 552e317a89
2 changed files with 9 additions and 9 deletions

View file

@ -5,7 +5,7 @@ nc
## Synopsis
```sh
$ nc [--listen] [--verbose] [--udp] [-N] [--length ] <target> <port>
$ nc [--length ] [--listen] [-N] [--udp] [--verbose] <target> <port>
```
## Description
@ -14,11 +14,11 @@ Network cat: Connect to network sockets as if it were a file.
## Options
* `-l`, `--listen`: Listen instead of connecting
* `-v`, `--verbose`: Log everything that's happening
* `-u`, `--udp`: UDP mode
* `-N`: Close connection after reading stdin to the end
* `-I`, `--length`: Set maximum tcp receive buffer size
* `-l`, `--listen`: Listen instead of connecting
* `-N`: Close connection after reading stdin to the end
* `-u`, `--udp`: UDP mode
* `-v`, `--verbose`: Log everything that's happening
## Arguments

View file

@ -55,11 +55,11 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
Core::ArgsParser args_parser;
args_parser.set_general_help("Network cat: Connect to network sockets as if it were a file.");
args_parser.add_option(should_listen, "Listen instead of connecting", "listen", 'l');
args_parser.add_option(verbose, "Log everything that's happening", "verbose", 'v');
args_parser.add_option(udp_mode, "UDP mode", "udp", 'u');
args_parser.add_option(should_close, "Close connection after reading stdin to the end", nullptr, 'N');
args_parser.add_option(maximum_tcp_receive_buffer_size_input, "Set maximum tcp receive buffer size", "length", 'I', nullptr);
args_parser.add_option(should_listen, "Listen instead of connecting", "listen", 'l');
args_parser.add_option(should_close, "Close connection after reading stdin to the end", nullptr, 'N');
args_parser.add_option(udp_mode, "UDP mode", "udp", 'u');
args_parser.add_option(verbose, "Log everything that's happening", "verbose", 'v');
args_parser.add_positional_argument(target, "Address to listen on, or the address or hostname to connect to", "target");
args_parser.add_positional_argument(port, "Port to connect to or listen on", "port");
args_parser.parse(arguments);