mirror of
https://github.com/sametersoylu/argument-parser.git
synced 2026-05-28 20:08:10 +00:00
Add should_exit support for v2 parsers
- Add should_exit support to v2 platform parsers - Introduce macros.h and integrate trait hints - Wire CMake packaging with config, version, and install dirs - Update parser traits to include validation hooks and fixes
This commit is contained in:
@@ -15,7 +15,7 @@ namespace argument_parser {
|
||||
}
|
||||
|
||||
namespace v2 {
|
||||
linux_parser::linux_parser() {
|
||||
linux_parser::linux_parser(bool should_exit) {
|
||||
std::ifstream command_line_file{"/proc/self/cmdline"};
|
||||
std::string program_name;
|
||||
std::getline(command_line_file, program_name, '\0');
|
||||
@@ -25,7 +25,7 @@ namespace argument_parser {
|
||||
parsed_arguments.emplace_back(line);
|
||||
}
|
||||
|
||||
prepare_help_flag();
|
||||
prepare_help_flag(should_exit);
|
||||
}
|
||||
} // namespace v2
|
||||
} // namespace argument_parser
|
||||
|
||||
Reference in New Issue
Block a user