1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:27:43 +00:00

LibCore: Add --version flag to ArgsParser

`--version` always prints "git" for now.

The motivation is that the neofetch port calls `Shell --version` and
adds the output to its output. And if `Shell --version` prints a long
error message about it not knowing the flag, neofetch's output looks a
bit ugly. Per Discord discussion, just add the flag to ArgsParser
instead of only to Shell.
This commit is contained in:
Nico Weber 2021-08-14 13:34:34 -04:00 committed by Ali Mohammad Pur
parent 7d4addc6d3
commit 1f71d7bf22
2 changed files with 9 additions and 1 deletions

View file

@ -83,6 +83,7 @@ private:
Vector<Arg> m_positional_args;
bool m_show_help { false };
bool m_show_version { false };
const char* m_general_help { nullptr };
bool m_stop_on_first_non_option { false };
};