diff options
author | jak1 <mike.wollmann@gmail.com> | 2021-05-31 22:05:41 +0200 |
---|---|---|
committer | jak1 <mike.wollmann@gmail.com> | 2021-05-31 22:05:41 +0200 |
commit | 8c1d7f90342749a14c3d222a664c98d22baeb559 (patch) | |
tree | 974e52eadbceb8190f3b85a0709bd1ef38b66fc6 /src | |
parent | 4ce4acaf9b4f8ab8843ded3dc6253171ce616e9a (diff) | |
download | plus-8c1d7f90342749a14c3d222a664c98d22baeb559.tar.gz plus-8c1d7f90342749a14c3d222a664c98d22baeb559.tar.bz2 plus-8c1d7f90342749a14c3d222a664c98d22baeb559.tar.xz plus-8c1d7f90342749a14c3d222a664c98d22baeb559.zip |
added --uniqueSession/-S flag for launcher usage
Diffstat (limited to 'src')
-rw-r--r-- | src/commandline.cpp | 6 | ||||
-rw-r--r-- | src/options.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/commandline.cpp b/src/commandline.cpp index ba0a54d69..048565f3e 100644 --- a/src/commandline.cpp +++ b/src/commandline.cpp @@ -135,7 +135,7 @@ static void printVersion() void parseOptions(const int argc, char *const argv[]) { - const char *const optstring = "hvud:U:P:Dc:p:y:l:L:C:s:t:T:a:r:e:V"; + const char *const optstring = "hvud:U:P:Dc:p:y:l:L:C:s:t:T:a:r:e:V:S"; const option long_options[] = { @@ -165,6 +165,7 @@ void parseOptions(const int argc, char *const argv[]) { "hide-cursor", no_argument, nullptr, 'q' }, { "error", no_argument, nullptr, 'e' }, { "validate", no_argument, nullptr, 'V' }, + { "unique-session", no_argument, nullptr, 'S' }, { nullptr, 0, nullptr, 0 } }; @@ -268,6 +269,9 @@ void parseOptions(const int argc, char *const argv[]) case 'V': options.validate = true; break; + case 'S': + options.uniqueSession = true; + break; default: break; } diff --git a/src/options.h b/src/options.h index 267a94556..d4d8bb8bd 100644 --- a/src/options.h +++ b/src/options.h @@ -67,7 +67,8 @@ struct Options final ipc(false), hideCursor(false), error(false), - validate(false) + validate(false), + uniqueSession(false) {} A_DELETE_COPY(Options) @@ -100,6 +101,7 @@ struct Options final bool hideCursor; bool error; bool validate; + bool uniqueSession; }; #endif // OPTIONS_H |