diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt index f535f594b46..20f2447a3a9 100644 --- a/Userland/Utilities/CMakeLists.txt +++ b/Userland/Utilities/CMakeLists.txt @@ -138,6 +138,7 @@ target_link_libraries(mv LibMain) target_link_libraries(mount LibMain) target_link_libraries(nc LibMain) target_link_libraries(netstat LibMain) +target_link_libraries(nl LibMain) target_link_libraries(notify LibGUI) target_link_libraries(nproc LibMain) target_link_libraries(open LibDesktop) diff --git a/Userland/Utilities/nl.cpp b/Userland/Utilities/nl.cpp index c9752be16e4..28d080fdac5 100644 --- a/Userland/Utilities/nl.cpp +++ b/Userland/Utilities/nl.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -17,7 +18,7 @@ enum NumberStyle { NumberNoLines, }; -int main(int argc, char** argv) +ErrorOr serenity_main(Main::Arguments arguments) { NumberStyle number_style = NumberNonEmptyLines; int increment = 1; @@ -54,7 +55,7 @@ int main(int argc, char** argv) args_parser.add_option(start_number, "Initial line number", "startnum", 'v', "number"); args_parser.add_option(number_width, "Number width", "width", 'w', "number"); args_parser.add_positional_argument(files, "Files to process", "file", Core::ArgsParser::Required::No); - args_parser.parse(argc, argv); + args_parser.parse(arguments); Vector file_pointers; if (!files.is_empty()) {