mirror of
https://github.com/KLayout/klayout.git
synced 2026-09-03 08:26:27 +02:00
Implementing --help as alias for -h and --version as alias for -v
This commit is contained in:
@@ -305,12 +305,12 @@ klayout_main (int &argc, char **argv)
|
||||
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
|
||||
if (argv [i] == std::string ("-v")) {
|
||||
if (argv [i] == std::string ("-v") || argv [i] == std::string ("--version")) {
|
||||
|
||||
tl::info << lay::ApplicationBase::version ();
|
||||
return 0;
|
||||
|
||||
} else if (argv [i] == std::string ("-h")) {
|
||||
} else if (argv [i] == std::string ("-h") || argv [i] == std::string ("--help")) {
|
||||
|
||||
tl::info << lay::ApplicationBase::usage () << tl::noendl;
|
||||
return 0;
|
||||
|
||||
@@ -1091,7 +1091,7 @@ ApplicationBase::usage ()
|
||||
r += tl::to_string (QObject::tr (" -t Don't update the configuration file on exit")) + "\n";
|
||||
r += tl::to_string (QObject::tr (" -nt Update the configuration file on exit (default, overrides previous -t option)")) + "\n";
|
||||
r += tl::to_string (QObject::tr (" -u <file name> Restore session from given file")) + "\n";
|
||||
r += tl::to_string (QObject::tr (" -v Print program version and exit")) + "\n";
|
||||
r += tl::to_string (QObject::tr (" -v Print program version and exit (also available as --version)")) + "\n";
|
||||
r += tl::to_string (QObject::tr (" -wd <name>=<value> Define a variable within expressions")) + "\n";
|
||||
r += tl::to_string (QObject::tr (" -x Synchronous drawing mode")) + "\n";
|
||||
r += tl::to_string (QObject::tr (" -y <package> Package installation: install package(s) and exit - can be used more than once")) + "\n";
|
||||
|
||||
Reference in New Issue
Block a user