From 47a692b6515857541fc84744d275a2d1cdd29f6c Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Mon, 5 Sep 2016 21:40:47 +0200 Subject: [PATCH 01/36] Bumped version number to 1.2.0 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb8617f..435a044 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ set (HAVE_CMAKE true) project (tasksh) include (CXXSniffer) -set (PROJECT_VERSION "1.1.0") +set (PROJECT_VERSION "1.2.0") include (CheckFunctionExists) include (CheckStructHasMember) From 97897f6f90b8790d97ec746e3ecf203cbe3e96c3 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Mon, 5 Sep 2016 21:51:12 +0200 Subject: [PATCH 02/36] Bumped version numbers in documentation --- ChangeLog | 4 ++++ NEWS | 20 +++++++------------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index c02f351..ed76baf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +1,2,0 () - + +- + ------ current release --------------------------- 1.1.0 (2016-09-06) 464f5ae19f853911e739c2489897aef64345c388 diff --git a/NEWS b/NEWS index a1fa425..9962b56 100644 --- a/NEWS +++ b/NEWS @@ -1,25 +1,19 @@ -New Features in tasksh 1.1.0 +New Features in tasksh 1.2.0 - - Support for a GTD-like review session. + - -New commands in tasksh 1.1.0 +New commands in tasksh 1.2.0 - - 'review' begins an interactive review session - - 'diag' shows diagnostic info for problem solving + - -New configuration options in tasksh 1.1.0 +New configuration options in tasksh 1.2.0 - - The 'tasksh.autoclear' setting in Taskwarrior is used by Tasksh to clear - the terminal before every command, if set to '1'. + - Known Issues - - Spaces in project names in tasksh - https://bug.tasktools.org/browse/TS-3 - - - Tasksh throws errors on unescaped parentheses - https://bug.tasktools.org/browse/TS-23 + - Tasksh has been built and tested on the following configurations: From 5a4176ac1b97bd76bcfdef72c68f3f79236ce839 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 5 Sep 2016 16:21:01 -0400 Subject: [PATCH 03/36] Docs: Typo fix --- AUTHORS | 2 +- ChangeLog | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index b69cd32..1820ae5 100644 --- a/AUTHORS +++ b/AUTHORS @@ -19,4 +19,4 @@ suggestions: jonbobbly hosaka Lars Kumbier - Ian R. Learmonth + Iain R. Learmonth diff --git a/ChangeLog b/ChangeLog index c02f351..faecf5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,7 +11,7 @@ - TS-24 add review option (m)odify (thanks to David Patrick). - TS-28 Please add a (m)odify feature for review - (thanks to Ian R. Learmonth). + (thanks to Iain R. Learmonth). - Implemented 'review' command. - Implemented 'diag' command. - Added 'review N' option, to specify the number of tasks you would like to From dd1856e0583ceabf85611dcfae47c21cb79d8c06 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Mon, 5 Sep 2016 23:23:08 +0200 Subject: [PATCH 04/36] Removed README.md from docfiles to install --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 435a044..205cf7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,7 +63,7 @@ if (EXISTS ${CMAKE_SOURCE_DIR}/test) add_subdirectory (test EXCLUDE_FROM_ALL) endif (EXISTS ${CMAKE_SOURCE_DIR}/test) -set (doc_FILES NEWS ChangeLog README.md INSTALL AUTHORS COPYING) +set (doc_FILES NEWS ChangeLog INSTALL AUTHORS COPYING) foreach (doc_FILE ${doc_FILES}) install (FILES ${doc_FILE} DESTINATION ${TASKSH_DOCDIR}) endforeach (doc_FILE) From cc357231b343a9ab2b48a737f923e49a2bb721d2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 6 Sep 2016 08:15:21 -0400 Subject: [PATCH 05/36] TS-29: tasksh hangs trying to read task from stdin - Thanks to ilove zfs. --- AUTHORS | 1 + ChangeLog | 5 +++-- src/main.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/AUTHORS b/AUTHORS index 1820ae5..d235335 100644 --- a/AUTHORS +++ b/AUTHORS @@ -8,6 +8,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Jörg Krause Ben Boeckel + ilove zfs Thanks to the following, who submitted detailed bug reports and excellent suggestions: diff --git a/ChangeLog b/ChangeLog index 82feb02..bf3a024 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ -1,2,0 () - +1.2.0 () - -- +- TS-29 tasksh hangs trying to read task from stdin + (thanks to ilove zfs). ------ current release --------------------------- diff --git a/src/main.cpp b/src/main.cpp index 556e7b3..9025a21 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #ifdef HAVE_READLINE @@ -125,6 +126,8 @@ static int commandLoop (bool autoClear) // cause the shell to terminate. } } + else + status = 1; return status; } @@ -155,7 +158,9 @@ int main (int argc, const char** argv) output == "yes\n" || output == "on\n"); - welcome (); + if (isatty (fileno (stdin))) + welcome (); + while ((status = commandLoop (autoClear)) == 0) ; } From 346e8881e40cacc3beed57bd2e0f575437050db3 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 6 Sep 2016 08:26:41 -0400 Subject: [PATCH 06/36] Portability: Missing include for Cygwin --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index 9025a21..b9c5bae 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include From ccd21f4060ef5b73d096616bc1e80650947ffc32 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Fri, 11 Nov 2016 17:48:26 -0500 Subject: [PATCH 07/36] TS-32: control-d to exit - Thanks to Eric Hymowitz. --- AUTHORS | 1 + ChangeLog | 2 ++ NEWS | 2 +- src/main.cpp | 12 ++++++++---- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index d235335..1e178c9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -21,3 +21,4 @@ suggestions: hosaka Lars Kumbier Iain R. Learmonth + Eric Hymowitz diff --git a/ChangeLog b/ChangeLog index bf3a024..6da291b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ - TS-29 tasksh hangs trying to read task from stdin (thanks to ilove zfs). +- TS-32 control-d to exit + (thanks to Eric Hymowitz). ------ current release --------------------------- diff --git a/NEWS b/NEWS index 9962b56..1de0bfd 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ New Features in tasksh 1.2.0 - - + - Responds to Ctrl-D by exiting. New commands in tasksh 1.2.0 diff --git a/src/main.cpp b/src/main.cpp index b9c5bae..1134faf 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -69,6 +69,7 @@ const std::string getResponse (const std::string& prompt) if (! line_read) { std::cout << "\n"; + response = ""; } else { @@ -105,12 +106,17 @@ static int commandLoop (bool autoClear) std::cout << "\033[2J\033[0;0H"; int status = 0; - if (command != "") + if (! isatty (fileno (stdin)) && command == "") + { + status = -1; + } + else if (command != "") { std::vector args = split (command, ' '); // Dispatch command. - if (closeEnough ("exit", args[0], 3)) status = -1; + if (args[0] == "") status = -1; + else if (closeEnough ("exit", args[0], 3)) status = -1; else if (closeEnough ("quit", args[0], 3)) status = -1; else if (closeEnough ("help", args[0], 3)) status = cmdHelp (); else if (closeEnough ("diagnostics", args[0], 3)) status = cmdDiagnostics (); @@ -127,8 +133,6 @@ static int commandLoop (bool autoClear) // cause the shell to terminate. } } - else - status = 1; return status; } From b8debf69bc3cbd09760add48b812acc6f29b6fc8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 19 Nov 2016 13:53:10 -0500 Subject: [PATCH 08/36] libshared: Updated to ce5c3414de56a2d1390893bbdc46e7116c38cd90 --- src/libshared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libshared b/src/libshared index 83f8ac2..ce5c341 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit 83f8ac2a0de4caba98472925ae710c5124ad61c3 +Subproject commit ce5c3414de56a2d1390893bbdc46e7116c38cd90 From 13447e1bc84e21e01a52d202476a4fbe8300768f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 21 Nov 2016 22:32:15 -0500 Subject: [PATCH 09/36] Tests: Set sys.stdout as utf8 --- test/run_all | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/run_all b/test/run_all index a41aa6c..7f91a32 100755 --- a/test/run_all +++ b/test/run_all @@ -12,6 +12,9 @@ from multiprocessing import cpu_count from threading import Thread from subprocess import call, Popen, PIPE +if sys.version_info > (3,): + import codecs + try: # python 2 from Queue import Queue, Empty @@ -60,7 +63,10 @@ def run_test(testqueue, outqueue, threadname): class TestRunner(object): def __init__(self): self.threads = [] - self.tap = open(cmd_args.tapfile, 'w') + if sys.version_info > (3,): + self.tap = open(cmd_args.tapfile, 'w', errors='ignore') + else: + self.tap = open(cmd_args.tapfile, 'w') self._parallelq = Queue() self._serialq = Queue() @@ -197,6 +203,9 @@ def parse_args(): def main(): + if sys.version_info > (3,): + sys.stdout = codecs.getwriter("utf-8")(sys.stdout.detach()) + runner = TestRunner() runner.start() From e967c874a2c8f5b57fdc87ab8eadd39f91093e2e Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Tue, 22 Nov 2016 10:21:35 -0500 Subject: [PATCH 10/36] Tests: Removed TASKD_USE_PATH --- test/run_all | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/run_all b/test/run_all index 7f91a32..9bdb578 100755 --- a/test/run_all +++ b/test/run_all @@ -22,9 +22,6 @@ except ImportError: # python 3 from queue import Queue, Empty -# Look for taskd in $PATH instead of task/src/ -os.environ["TASKD_USE_PATH"] = "1" - TIMEOUT = .2 From 008f183bd135bbd56d325039af98a0425e205c8c Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 1 Jan 2017 12:35:12 -0500 Subject: [PATCH 11/36] Copyright update --- COPYING | 2 +- LICENSE | 2 +- doc/man/tasksh.1.in | 2 +- src/diag.cpp | 2 +- src/help.cpp | 2 +- src/main.cpp | 2 +- src/prompt.cpp | 2 +- src/review.cpp | 2 +- src/shell.cpp | 2 +- test/simpletap/__init__.py | 2 +- test/template.t | 2 +- test/test.cpp | 2 +- test/test.h | 2 +- test/version.t | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/COPYING b/COPYING index a3ce750..9295662 100644 --- a/COPYING +++ b/COPYING @@ -1,6 +1,6 @@ tasksh - a shell/frontend for the command line task list manager taskwarrior. -Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/LICENSE b/LICENSE index 16e8ea0..f9ab300 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ tasksh - a shell/frontend for ithe command line task list manager taskwarrior. -Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/doc/man/tasksh.1.in b/doc/man/tasksh.1.in index c746c4b..c395d69 100644 --- a/doc/man/tasksh.1.in +++ b/doc/man/tasksh.1.in @@ -144,7 +144,7 @@ If set to "1", causes each tasksh command to be preceded by a 'clear screen' and cursor reset. Default is "0". .SH "CREDITS & COPYRIGHTS" -Copyright (C) 2006 \- 2016 P. Beckingham, F. Hernandez. +Copyright (C) 2006 \- 2017 P. Beckingham, F. Hernandez. This man page was originally written by Federico Hernandez. diff --git a/src/diag.cpp b/src/diag.cpp index b0a0474..69492af 100644 --- a/src/diag.cpp +++ b/src/diag.cpp @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/help.cpp b/src/help.cpp index 5ce2fae..bef7d53 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/main.cpp b/src/main.cpp index 1134faf..d45b147 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/prompt.cpp b/src/prompt.cpp index 3e7a0d0..1f6eb4d 100644 --- a/src/prompt.cpp +++ b/src/prompt.cpp @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/review.cpp b/src/review.cpp index ee9020a..a0de70e 100644 --- a/src/review.cpp +++ b/src/review.cpp @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/shell.cpp b/src/shell.cpp index 4cf4dff..b58a270 100644 --- a/src/shell.cpp +++ b/src/shell.cpp @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/test/simpletap/__init__.py b/test/simpletap/__init__.py index 157eae7..518d48c 100644 --- a/test/simpletap/__init__.py +++ b/test/simpletap/__init__.py @@ -1,6 +1,6 @@ ############################################################################### # -# Copyright 2006-2016, Paul Beckingham, Federico Hernandez. +# Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/test/template.t b/test/template.t index 83b8920..027b1d0 100644 --- a/test/template.t +++ b/test/template.t @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- ############################################################################### # -# Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +# Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal diff --git a/test/test.cpp b/test/test.cpp index 60ddd3c..9dc7552 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/test/test.h b/test/test.h index 2127077..fa65f9b 100644 --- a/test/test.h +++ b/test/test.h @@ -1,6 +1,6 @@ //////////////////////////////////////////////////////////////////////////////// // -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +// Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/test/version.t b/test/version.t index d2b680e..d2d5354 100755 --- a/test/version.t +++ b/test/version.t @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- ############################################################################### # -# Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. +# Copyright 2006 - 2017, Paul Beckingham, Federico Hernandez. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal From b3e4867a8df0474f753c83fc7241a0ad93efa893 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 1 Jan 2017 12:35:49 -0500 Subject: [PATCH 12/36] Cleanup: Removed unused file --- src/text.h | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 src/text.h diff --git a/src/text.h b/src/text.h deleted file mode 100644 index d577f86..0000000 --- a/src/text.h +++ /dev/null @@ -1,48 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// http://www.opensource.org/licenses/mit-license.php -// -//////////////////////////////////////////////////////////////////////////////// - -#ifndef INCLUDED_TEXT -#define INCLUDED_TEXT - -#include -#include - -void wrapText (std::vector &, const std::string&, const int, bool); -std::string trimLeft (const std::string& in, const std::string& t = " "); -std::string trimRight (const std::string& in, const std::string& t = " "); -std::string trim (const std::string& in, const std::string& t = " "); -bool extractLine (std::string&, const std::string&, int, bool, unsigned int&); -void split (std::vector&, const std::string&, const char); -void join (std::string&, const std::string&, const std::vector&); -std::string lowerCase (const std::string&); -bool compare (const std::string&, const std::string&, bool sensitive = true); -bool closeEnough (const std::string&, const std::string&, unsigned int minLength = 0); -const std::string format (int); -const std::string format (const std::string&, const std::string&); -const std::string format (const std::string&, int, int); - -#endif -//////////////////////////////////////////////////////////////////////////////// From 0f9a8e38778844452508a435ffdf2a2ff58a4f1a Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 7 Jan 2017 09:46:58 -0500 Subject: [PATCH 13/36] TS-34: Tasksh throw a warning at the end of a review command - Thanks to bjonnh. --- AUTHORS | 2 ++ ChangeLog | 2 ++ src/review.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 1e178c9..240bcfd 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,3 +22,5 @@ suggestions: Lars Kumbier Iain R. Learmonth Eric Hymowitz + bjonnh + diff --git a/ChangeLog b/ChangeLog index 6da291b..f50ffe6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,8 @@ (thanks to ilove zfs). - TS-32 control-d to exit (thanks to Eric Hymowitz). +- TS-34 Tasksh throw a warning at the end of a review command + (thanks to bjonnh). ------ current release --------------------------- diff --git a/src/review.cpp b/src/review.cpp index a0de70e..ddb187d 100644 --- a/src/review.cpp +++ b/src/review.cpp @@ -241,7 +241,7 @@ static void reviewLoop (const std::vector & uuids, unsigned int lim response = getResponse (menu ()); if (response == "e") { editTask (uuid); } - if (response == "m") { modifyTask (uuid); repeat = true; } + else if (response == "m") { modifyTask (uuid); repeat = true; } else if (response == "s") { std::cout << "Skipped\n\n"; ++current; } else if (response == "c") { completeTask (uuid); ++current; ++reviewed; } else if (response == "d") { deleteTask (uuid); ++current; ++reviewed; } From f48b17cddbd98de8c50fc475fe68174550fb3e07 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 12:20:19 -0500 Subject: [PATCH 14/36] libshared: Updated to aff911bd080a05e5e12a240e13adb27f435b5bb2 --- src/libshared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libshared b/src/libshared index ce5c341..aff911b 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit ce5c3414de56a2d1390893bbdc46e7116c38cd90 +Subproject commit aff911bd080a05e5e12a240e13adb27f435b5bb2 From 0be6d781bdc295fac65285186e378e6a808de27d Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 12:21:00 -0500 Subject: [PATCH 15/36] diag: Migrated to libshared osName --- src/diag.cpp | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/diag.cpp b/src/diag.cpp index 69492af..734b5ab 100644 --- a/src/diag.cpp +++ b/src/diag.cpp @@ -48,33 +48,8 @@ int cmdDiagnostics () std::cout << "\n" << bold.colorize (PACKAGE_STRING) - << "\n"; - - std::cout << " " << "Platform: " - << -#if defined (DARWIN) - "Darwin" -#elif defined (SOLARIS) - "Solaris" -#elif defined (CYGWIN) - "Cygwin" -#elif defined (HAIKU) - "Haiku" -#elif defined (OPENBSD) - "OpenBSD" -#elif defined (FREEBSD) - "FreeBSD" -#elif defined (NETBSD) - "NetBSD" -#elif defined (LINUX) - "Linux" -#elif defined (KFREEBSD) -TRING_CMD_DIAG_COMPILER -#elif defined (GNUHURD) - "GNU/Hurd" -#else - "Unknown" -#endif + << "\n" + << " " << "Platform: " << osName () << "\n\n"; // Compiler. From c3d366ce78cc2236e147e4d147ef6ec9638c5884 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 14:13:31 -0500 Subject: [PATCH 16/36] libshared: Updated to bfb0e90e0c94918b86dd16d8b0e05a74bab8fb75 --- src/libshared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libshared b/src/libshared index aff911b..bfb0e90 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit aff911bd080a05e5e12a240e13adb27f435b5bb2 +Subproject commit bfb0e90e0c94918b86dd16d8b0e05a74bab8fb75 From fa79935c8b0ccab5257ca99e0a72e90f8b3d6e76 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 14:13:50 -0500 Subject: [PATCH 17/36] diag: Updated to libshared cppCompliance call --- src/diag.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/diag.cpp b/src/diag.cpp index 734b5ab..507eae0 100644 --- a/src/diag.cpp +++ b/src/diag.cpp @@ -89,18 +89,8 @@ int cmdDiagnostics () << "\n"; // Compiler compliance level. - std::string compliance = "non-compliant"; -#ifdef __cplusplus - int level = __cplusplus; - if (level == 199711) - compliance = "C++98/03"; - else if (level == 201103) - compliance = "C++11"; - else - compliance = format (level); -#endif std::cout << " Compliance: " - << compliance + << cppCompliance () << "\n\n"; std::cout << bold.colorize ("Build Features") From cc2e173d74adb96f5273d4609c6df812776157d7 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 14:17:26 -0500 Subject: [PATCH 18/36] diag: Greater C++11 compliance --- src/diag.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/diag.cpp b/src/diag.cpp index 507eae0..8478fba 100644 --- a/src/diag.cpp +++ b/src/diag.cpp @@ -126,7 +126,7 @@ int cmdDiagnostics () std::cout << bold.colorize ("Configuration") << "\n"; - char* env = getenv ("TASKRC"); + auto env = getenv ("TASKRC"); std::cout << " TASKRC: " << (env ? env : "") << "\n"; @@ -140,12 +140,9 @@ int cmdDiagnostics () std::string path (getenv ("PATH")); std::cout << " PATH: " << path << "\n"; - std::vector paths = split (path, ':'); - - std::vector ::iterator i; - for (i = paths.begin (); i != paths.end (); ++i) + for (const auto& i : split (path, ':')) { - File task (*i + "/task"); + File task (i + "/task"); if (task.exists ()) { std::string input; @@ -153,8 +150,8 @@ int cmdDiagnostics () execute ("task", {"--version"}, input, output); std::cout << "Taskwarrior: " - << (*i + "/task") - << " " + << i + << "/task " << output; // Still has \n } } From a2a900d1444e9622143850c2ff436d7a9fd06df8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 14:26:22 -0500 Subject: [PATCH 19/36] prompt: Greater C++11 compliance --- src/prompt.cpp | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/src/prompt.cpp b/src/prompt.cpp index 1f6eb4d..b1d40f5 100644 --- a/src/prompt.cpp +++ b/src/prompt.cpp @@ -29,8 +29,7 @@ #include #include -static const char* contextColors[] = -{ +static std::vector contextColors = { "bold white on red", "bold white on blue", "bold white on green", @@ -40,8 +39,6 @@ static const char* contextColors[] = "black on white", }; -#define NUM_COLORS (sizeof (contextColors) / sizeof (contextColors[0])) - static std::vector contexts; std::string composeContexts (bool pretty = false); @@ -73,21 +70,14 @@ int promptAdd (const std::string& context) std::string composeContexts (bool pretty /* = false */) { std::string combined; - for (unsigned int i = 0; i < contexts.size (); ++i) - { + for (unsigned int i = 0; i < contexts.size (); i++) if (pretty) - { - combined += (i ? " " : "") + combined += (combined != "" ? " " : "") + std::string ("\001") - + Color::colorize ("\002 " + contexts[i] + " \001", contextColors[i % NUM_COLORS]) + + Color::colorize ("\002 " + contexts[i] + " \001", contextColors[i % contextColors.size ()]) + "\002"; - - } else - { - combined += (i ? " " : "") + contexts[i]; - } - } + combined += (combined != "" ? " " : "") + contexts[i]; if (combined != "") combined += ' '; @@ -103,9 +93,9 @@ std::string promptCompose () // TODO - The accumulated context, as colored tokens. // TODO - sync status // TODO - time - std::string decoration = composeContexts (true); + auto decoration = composeContexts (true); if (decoration.length ()) - return "task " + composeContexts (true) + "> "; + return "task " + decoration + "> "; return "tasksh> "; } From ab7245cb8ae6a7a3bb466ff89d2d0ccfebe3eb13 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 14:33:03 -0500 Subject: [PATCH 20/36] shell: Clarifying comment --- src/shell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell.cpp b/src/shell.cpp index b58a270..8c14590 100644 --- a/src/shell.cpp +++ b/src/shell.cpp @@ -40,7 +40,7 @@ int cmdShell (const std::vector & args) combined = combined.substr (1); system (combined.c_str ()); - return 0; + return 0; // Ignore system return code. } //////////////////////////////////////////////////////////////////////////////// From 9868566f8d56082005ec673ea5babc29bb370cb8 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 14:34:00 -0500 Subject: [PATCH 21/36] help: Great Core Guidelines compliance --- src/help.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/help.cpp b/src/help.cpp index bef7d53..2af1a01 100644 --- a/src/help.cpp +++ b/src/help.cpp @@ -30,7 +30,7 @@ //////////////////////////////////////////////////////////////////////////////// int cmdHelp () { - std::cout << "\n" + std::cout << '\n' << " Commands:\n" << " tasksh> list Or any other Taskwarrior command\n" << " tasksh> review [N] Task review session, with optional cutoff after N tasks\n" @@ -38,10 +38,10 @@ int cmdHelp () << " tasksh> help Tasksh help\n" << " tasksh> diagnostics Tasksh diagnostics\n" << " tasksh> quit End of session. May also use 'exit'\n" - << "\n" + << '\n' << "Run 'man tasksh' from your shell prompt.\n" << "Run '! man tasksh' from inside tasksh.\n" - << "\n"; + << '\n'; return 0; } From daecfec750c7553e7cc80ad51078a01fd077b13f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 14:40:22 -0500 Subject: [PATCH 22/36] main: Greater Core Guidelines compliance --- src/main.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index d45b147..6357f6a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,9 +84,7 @@ const std::string getResponse (const std::string& prompt) std::cout << prompt; std::getline (std::cin, response); if (std::cin.eof () == 1) - { std::cout << "\n"; - } #endif return response; @@ -96,10 +94,10 @@ const std::string getResponse (const std::string& prompt) static int commandLoop (bool autoClear) { // Compose the prompt. - std::string prompt = promptCompose (); + auto prompt = promptCompose (); // Display prompt, get input. - std::string command = getResponse (prompt); + auto command = getResponse (prompt); // Obey Taskwarrior's rc.tasksh.autoclear. if (autoClear) @@ -112,7 +110,7 @@ static int commandLoop (bool autoClear) } else if (command != "") { - std::vector args = split (command, ' '); + auto args = split (command, ' '); // Dispatch command. if (args[0] == "") status = -1; From 09032052d136b98c8ac982ac1255308b636dc217 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 8 Jan 2017 14:40:39 -0500 Subject: [PATCH 23/36] review: Greater Core Guidelines compliance --- src/review.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/review.cpp b/src/review.cpp index ddb187d..5df3eb4 100644 --- a/src/review.cpp +++ b/src/review.cpp @@ -65,12 +65,6 @@ static unsigned int getWidth () width = buff[1]; } - // Ncurses does this, and perhaps we need to as well, to avoid a problem on - // Cygwin where the display goes right up to the terminal width, and causes - // an odd color wrapping problem. -// if (config.getBoolean ("avoidlastcolumn")) -// --width; - return width; } @@ -137,7 +131,7 @@ static const std::string reviewStart ( unsigned int width) { std::string welcome = "The review process is important for keeping your list " - "accurate, so you are working on the right thing.\n" + "accurate, so you are working on the right tasks.\n" "\n" "For each task you are shown, look at the metadata. " "Determine whether the task needs to be changed (enter " @@ -187,8 +181,7 @@ static const std::string banner ( //////////////////////////////////////////////////////////////////////////////// static const std::string menu () { - Color text ("color15 on gray6"); - return text.colorize (" (Enter) Mark as reviewed, (s)kip, (e)dit, (m)odify, (c)omplete, (d)elete, (q)uit ") + " "; + return Color ("color15 on gray6").colorize (" (Enter) Mark as reviewed, (s)kip, (e)dit, (m)odify, (c)omplete, (d)elete, (q)uit ") + " "; } //////////////////////////////////////////////////////////////////////////////// @@ -319,7 +312,7 @@ int cmdReview (const std::vector & args, bool autoClear) input, output); // Review the set of UUIDs. - std::vector uuids = split (Lexer::trimRight (output, "\n"), '\n'); + auto uuids = split (Lexer::trimRight (output, "\n"), '\n'); reviewLoop (uuids, limit, autoClear); return 0; } From d5bd17cff04ea146ca4d23f26101d7436c59865d Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 5 Feb 2017 15:03:13 +0100 Subject: [PATCH 24/36] =?UTF-8?q?Review:=20report=20now=20defaults=20to=20?= =?UTF-8?q?6=20days=20instead=20of=201=20wee=C4=B7,=20which=20is=20more=20?= =?UTF-8?q?=20=20=20=20=20=20=20=20convenient=20for=20those=20who=20review?= =?UTF-8?q?=20weekly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Thanks to Dirk Deimeke. --- AUTHORS | 1 + ChangeLog | 3 +++ src/review.cpp | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 240bcfd..b44c784 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,6 +3,7 @@ the following people: Paul Beckingham (Principal Author) Federico Hernandez (Principal Author) + Dirk Deimeke (Technical Advisor & Evangelist) The following submitted code, packages or analysis, and deserve special thanks: diff --git a/ChangeLog b/ChangeLog index f50ffe6..aa4ea45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,9 @@ (thanks to Eric Hymowitz). - TS-34 Tasksh throw a warning at the end of a review command (thanks to bjonnh). +- Review report now defaults to 6 days instead of 1 weeķ, which is more + convenient for those who review weekly + (thanks to Dirk Deimeke). ------ current release --------------------------- diff --git a/src/review.cpp b/src/review.cpp index 5df3eb4..86ca12f 100644 --- a/src/review.cpp +++ b/src/review.cpp @@ -296,7 +296,7 @@ int cmdReview (const std::vector & args, bool autoClear) execute ("task", {"rc.confirmation:no", "rc.verbose:nothing", "config", "report._reviewed.columns", "uuid" }, input, output); execute ("task", {"rc.confirmation:no", "rc.verbose:nothing", "config", "report._reviewed.sort", "reviewed+,modified+"}, input, output); execute ("task", {"rc.confirmation:no", "rc.verbose:nothing", "config", "report._reviewed.filter", - "( reviewed.none: or reviewed.before:now-1week ) and ( +PENDING or +WAITING )" }, input, output); + "( reviewed.none: or reviewed.before:now-6days ) and ( +PENDING or +WAITING )" }, input, output); } } From 87d05ed28a3d479932c0c4d0dc8013ecf9baa24c Mon Sep 17 00:00:00 2001 From: Paul Fenwick Date: Tue, 21 Feb 2017 15:11:26 +1300 Subject: [PATCH 25/36] TS-32: Exit on Ctrl-D on non-readline systems. --- src/main.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 6357f6a..88c2043 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,7 +84,10 @@ const std::string getResponse (const std::string& prompt) std::cout << prompt; std::getline (std::cin, response); if (std::cin.eof () == 1) + { + response = ""; std::cout << "\n"; + } #endif return response; From 8c3580f5c6bc64f2c9c7adc86196e60add855b74 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 20 Feb 2017 23:17:40 -0500 Subject: [PATCH 26/36] TS-32: control-d to exit - Thanks to Paul Fenwick. --- AUTHORS | 1 + ChangeLog | 2 +- src/main.cpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS b/AUTHORS index b44c784..9617cca 100644 --- a/AUTHORS +++ b/AUTHORS @@ -10,6 +10,7 @@ The following submitted code, packages or analysis, and deserve special thanks: Jörg Krause Ben Boeckel ilove zfs + Paul Fenwick Thanks to the following, who submitted detailed bug reports and excellent suggestions: diff --git a/ChangeLog b/ChangeLog index aa4ea45..b94854a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,7 @@ - TS-29 tasksh hangs trying to read task from stdin (thanks to ilove zfs). - TS-32 control-d to exit - (thanks to Eric Hymowitz). + (thanks to Eric Hymowitz, Paul Fenwick). - TS-34 Tasksh throw a warning at the end of a review command (thanks to bjonnh). - Review report now defaults to 6 days instead of 1 weeķ, which is more diff --git a/src/main.cpp b/src/main.cpp index 88c2043..afba727 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -85,8 +85,8 @@ const std::string getResponse (const std::string& prompt) std::getline (std::cin, response); if (std::cin.eof () == 1) { - response = ""; std::cout << "\n"; + response = ""; } #endif From 62de6475b02791497e8f21e9e2d9f14e06d86bdd Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 1 Apr 2017 14:44:10 -0400 Subject: [PATCH 27/36] libshared: Updated to f1a3cd6bfabfb083fe3c26f580a15c0d60a92ee9 --- src/libshared | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libshared b/src/libshared index bfb0e90..f1a3cd6 160000 --- a/src/libshared +++ b/src/libshared @@ -1 +1 @@ -Subproject commit bfb0e90e0c94918b86dd16d8b0e05a74bab8fb75 +Subproject commit f1a3cd6bfabfb083fe3c26f580a15c0d60a92ee9 From d2e7b4f31d77568fb91b69fa1ac9d2b19ef644e6 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 1 Apr 2017 22:47:59 -0400 Subject: [PATCH 28/36] libshared: Updated URL --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 919cbab..675b3d4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "src/libshared"] path = src/libshared - url = https://git.tasktools.org/scm/tm/libshared.git + url = https://git.tasktools.org/TM/libshared.git From e6d05328cfc8e4691553416624b303e039310a82 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sun, 9 Apr 2017 16:47:33 -0400 Subject: [PATCH 29/36] Docs: Updated platform list --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 1de0bfd..4f9546e 100644 --- a/NEWS +++ b/NEWS @@ -17,7 +17,7 @@ Known Issues Tasksh has been built and tested on the following configurations: - * OS X + * macOS * Fedora * Ubuntu * Debian From 3f4b2284ad19beacd30e202e6c700a36c2b65c60 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Wed, 10 May 2017 00:05:29 +0200 Subject: [PATCH 30/36] Version number and release date for 1.2.0 --- ChangeLog | 2 +- doc/man/tasksh.1.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b94854a..733d5fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -1.2.0 () - +1.2.0 (2017-05-10) - - TS-29 tasksh hangs trying to read task from stdin (thanks to ilove zfs). diff --git a/doc/man/tasksh.1.in b/doc/man/tasksh.1.in index c395d69..0b0354c 100644 --- a/doc/man/tasksh.1.in +++ b/doc/man/tasksh.1.in @@ -1,4 +1,4 @@ -.TH tasksh 1 2016-09-06 "${PACKAGE_STRING}" "User Manuals" +.TH tasksh 1 2017-05-10 "${PACKAGE_STRING}" "User Manuals" .SH NAME tasksh \- Interactive taskwarrior shell From 68864e85263ea13dbcbfa46bead720ff1a53baa2 Mon Sep 17 00:00:00 2001 From: Federico Hernandez Date: Wed, 10 May 2017 00:26:28 +0200 Subject: [PATCH 31/36] Added SHA1 of tagged release commit --- ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 733d5fa..482479c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -1.2.0 (2017-05-10) - +1.2.0 (2017-05-10) 3f4b2284ad19beacd30e202e6c700a36c2b65c60 - TS-29 tasksh hangs trying to read task from stdin (thanks to ilove zfs). From 6bc537b9d95a8ab1547a747248103679ae4f8f90 Mon Sep 17 00:00:00 2001 From: Kyle Marek-Spartz Date: Tue, 10 Oct 2017 14:50:05 -0500 Subject: [PATCH 32/36] Hide information by default in review Originally submitted to taskwarrior-dev: https://groups.google.com/forum/#!topic/taskwarrior-dev/a8XizQmscl8 --- src/review.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/review.cpp b/src/review.cpp index 86ca12f..000838d 100644 --- a/src/review.cpp +++ b/src/review.cpp @@ -181,7 +181,7 @@ static const std::string banner ( //////////////////////////////////////////////////////////////////////////////// static const std::string menu () { - return Color ("color15 on gray6").colorize (" (Enter) Mark as reviewed, (s)kip, (e)dit, (m)odify, (c)omplete, (d)elete, (q)uit ") + " "; + return Color ("color15 on gray6").colorize (" (Enter) Mark as reviewed, (s)kip, (e)dit, (i)nformation, (m)odify, (c)omplete, (d)elete, (q)uit ") + " "; } //////////////////////////////////////////////////////////////////////////////// @@ -226,10 +226,6 @@ static void reviewLoop (const std::vector & uuids, unsigned int lim repeat = false; std::cout << banner (current + 1, total, width, Lexer::trimRight (description, "\n")); - // Use 'system' to run the command and show the output. - std::string command = "task " + uuid + " information"; - system (command.c_str ()); - // Display prompt, get input. response = getResponse (menu ()); @@ -241,6 +237,11 @@ static void reviewLoop (const std::vector & uuids, unsigned int lim else if (response == "") { reviewTask (uuid); ++current; ++reviewed; } else if (response == "r") { reviewTask (uuid); ++current; ++reviewed; } else if (response == "q") { break; } + else if (response == "i") { + // Use 'system' to run the command and show the output. + std::string command = "task " + uuid + " information"; + system (command.c_str ()); + } else { From 68d8a9acac5987a4bc27c37f630f663ed2b5f678 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 2 Jun 2018 19:57:55 -0400 Subject: [PATCH 33/36] Revert "Hide information by default in review" This reverts commit 6bc537b9d95a8ab1547a747248103679ae4f8f90. --- src/review.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/review.cpp b/src/review.cpp index 000838d..86ca12f 100644 --- a/src/review.cpp +++ b/src/review.cpp @@ -181,7 +181,7 @@ static const std::string banner ( //////////////////////////////////////////////////////////////////////////////// static const std::string menu () { - return Color ("color15 on gray6").colorize (" (Enter) Mark as reviewed, (s)kip, (e)dit, (i)nformation, (m)odify, (c)omplete, (d)elete, (q)uit ") + " "; + return Color ("color15 on gray6").colorize (" (Enter) Mark as reviewed, (s)kip, (e)dit, (m)odify, (c)omplete, (d)elete, (q)uit ") + " "; } //////////////////////////////////////////////////////////////////////////////// @@ -226,6 +226,10 @@ static void reviewLoop (const std::vector & uuids, unsigned int lim repeat = false; std::cout << banner (current + 1, total, width, Lexer::trimRight (description, "\n")); + // Use 'system' to run the command and show the output. + std::string command = "task " + uuid + " information"; + system (command.c_str ()); + // Display prompt, get input. response = getResponse (menu ()); @@ -237,11 +241,6 @@ static void reviewLoop (const std::vector & uuids, unsigned int lim else if (response == "") { reviewTask (uuid); ++current; ++reviewed; } else if (response == "r") { reviewTask (uuid); ++current; ++reviewed; } else if (response == "q") { break; } - else if (response == "i") { - // Use 'system' to run the command and show the output. - std::string command = "task " + uuid + " information"; - system (command.c_str ()); - } else { From 297b1b53c538b101c86cc9317a3190eaaa4168de Mon Sep 17 00:00:00 2001 From: David West Date: Sat, 8 Sep 2018 11:45:44 -0400 Subject: [PATCH 34/36] important info so people can build the project not obvious to use recursive without a tip --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c484eed..db30b60 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,6 @@ Thank you for taking a look at tasksh!! --- Tasksh is released under the MIT license. For details check the LICENSE file. + +# Important note +When cloning this from the repo to build from source make sure you `git clone --recursive` to get all required submodules. From abf75754f95cb5b8756e4ef898d4f8c4dd6a0a16 Mon Sep 17 00:00:00 2001 From: 0xACE <0xaced@gmail.com> Date: Sat, 12 Oct 2019 01:26:54 +0200 Subject: [PATCH 35/36] updated url for libshared submodule --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 675b3d4..0549462 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "src/libshared"] path = src/libshared - url = https://git.tasktools.org/TM/libshared.git + url = https://github.com/GothenburgBitFactory/libshared From 27bdb5019db4964173f0ce47483528a1b3c81b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20D=C3=B6rr?= Date: Sun, 9 Feb 2020 23:08:16 +0100 Subject: [PATCH 36/36] Add Installation Instructions for Debian/Ubuntu I spent quite some time trying to compile taskshell from source since I could not find `taskshell` with apt. Adding Installation Instructions might save other people time. --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index db30b60..b744a5f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +# Installing +* Debian/Ubuntu: +``` +$ sudo apt-get install tasksh +``` + # Disclaimer during ongoing development The development branch is a work in progress and may not pass all quality tests,