parent
ae75032936
commit
f706b8c9be
|
@ -914,6 +914,7 @@ int main(int argc, char* argv[])
|
||||||
{ "l", { false, "list existing sessions" } },
|
{ "l", { false, "list existing sessions" } },
|
||||||
{ "clear", { false, "clear dead sessions" } },
|
{ "clear", { false, "clear dead sessions" } },
|
||||||
{ "debug", { true, "initial debug option value" } },
|
{ "debug", { true, "initial debug option value" } },
|
||||||
|
{ "version", { false, "display kakoune version and exit" } },
|
||||||
{ "ro", { false, "readonly mode" } },
|
{ "ro", { false, "readonly mode" } },
|
||||||
{ "help", { false, "display a help message and quit" } } }
|
{ "help", { false, "display a help message and quit" } } }
|
||||||
};
|
};
|
||||||
|
@ -945,6 +946,12 @@ int main(int argc, char* argv[])
|
||||||
if (show_help_message)
|
if (show_help_message)
|
||||||
return show_usage();
|
return show_usage();
|
||||||
|
|
||||||
|
if (parser.get_switch("version"))
|
||||||
|
{
|
||||||
|
write_stdout(format("Kakoune {}\n", Kakoune::version));
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
const bool list_sessions = (bool)parser.get_switch("l");
|
const bool list_sessions = (bool)parser.get_switch("l");
|
||||||
const bool clear_sessions = (bool)parser.get_switch("clear");
|
const bool clear_sessions = (bool)parser.get_switch("clear");
|
||||||
if (list_sessions or clear_sessions)
|
if (list_sessions or clear_sessions)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user