From 552e317a89244a1bc3557786fec3f19b40f8ae13 Mon Sep 17 00:00:00 2001 From: Fabian Dellwing Date: Fri, 14 Apr 2023 11:34:16 +0200 Subject: [PATCH] nc: Sort command line arguments alphabetically --- Base/usr/share/man/man1/nc.md | 10 +++++----- Userland/Utilities/nc.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Base/usr/share/man/man1/nc.md b/Base/usr/share/man/man1/nc.md index 485ec91931..3ce46466fe 100644 --- a/Base/usr/share/man/man1/nc.md +++ b/Base/usr/share/man/man1/nc.md @@ -5,7 +5,7 @@ nc ## Synopsis ```sh -$ nc [--listen] [--verbose] [--udp] [-N] [--length ] +$ nc [--length ] [--listen] [-N] [--udp] [--verbose] ``` ## 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 diff --git a/Userland/Utilities/nc.cpp b/Userland/Utilities/nc.cpp index 7ea01aeccd..068b8a86ce 100644 --- a/Userland/Utilities/nc.cpp +++ b/Userland/Utilities/nc.cpp @@ -55,11 +55,11 @@ ErrorOr 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);