From 69a87ddf7faee8b26747b3e0c1cc97ab06bc779d Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 22 Dec 2016 14:02:31 +0100 Subject: Add --autoquit that will quit automatically if no action is performed within a given time span --- src/command_line_options.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/command_line_options.cpp') diff --git a/src/command_line_options.cpp b/src/command_line_options.cpp index 9b00080..f020f0d 100644 --- a/src/command_line_options.cpp +++ b/src/command_line_options.cpp @@ -6,6 +6,7 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) { // parse command line arguments (please sort by short option for easier handling) static const struct option longOptions[] = { + {"autoquit", required_argument, NULL, 'aqit'}, {"base", required_argument, NULL, 'b'}, {"path", required_argument, NULL, 'b'}, // Compatibility to v1.0 {"config", required_argument, NULL, 'c'}, @@ -37,6 +38,9 @@ CommandLineOptions::CommandLineOptions(int argc, char * const argv[]) { // Again, please sort alphabetically in getopt_long call and switch statement while ((c = getopt_long(argc, argv, "b:c:Dd:Ff:hl:P:pSs:t:T:u:vx:?", longOptions, NULL)) != -1) { switch (c) { + case 'aqit': + options.insert("autoquit", optarg); + break; case 'b': options.insert("base", optarg); break; -- cgit v1.2.3-55-g7522