- // Lightweight version checking that doesn't require initialization or any I/O.
- if (argc == 2 && !strcmp (argv[1], "--version"))
- {
- std::cout << VERSION << "\n";
- }
- else
- {
- try
- {
- // Get the Taskwarrior rc.tasksh.autoclear Boolean setting.
- bool autoClear = false;
- std::string input;
- std::string output;
- execute ("task", {"_get", "rc.tasksh.autoclear"}, input, output);
- output = lowerCase (output);
- autoClear = (output == "true\n" ||
- output == "1\n" ||
- output == "y\n" ||
- output == "yes\n" ||
- output == "on\n");
-
- while ((status = commandLoop (autoClear)) == 0)
- ;
- }