From bd88c20cabcae91bc634c27811599c7d88cb7566 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Sat, 9 Oct 2021 19:57:47 +0200 Subject: [PATCH 1/4] Add TODOTXT_VERBOSE to the configuration There's no command-line option to reduce verbosity (just -v to increase it), so users who would like to remove the additional messages (cp. https://github.com/todotxt/todo.txt-cli/discussions/364) have to configure this, but the variable is hard to find. Include the default value in commented-out form and some documentation of the possible values. --- todo.cfg | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/todo.cfg b/todo.cfg index 0ab7d9b..3ccd218 100644 --- a/todo.cfg +++ b/todo.cfg @@ -76,6 +76,13 @@ export REPORT_FILE="$TODO_DIR/report.txt" # === BEHAVIOR === +## verbosity +# +# By default, additional information and confirmation of actions (like +# "TODO: 1 added") are printed. You can suppress this via 0 or add extra +# verbosity via 2. +# export TODOTXT_VERBOSE=1 + ## customize list output # # TODOTXT_SORT_COMMAND will filter after line numbers are From 7a4da603744f7907e56363c4437fa9f858231789 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Mon, 28 Mar 2022 22:23:17 +0200 Subject: [PATCH 2/4] Documentation: Clarify that CONFIG_DIR is for the configuration template And only coincidentally picked up as the global configuration (if CONFIG_DIR=/etc). Fixes #377 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 925afc8..8cd987d 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ make test *NOTE:* Makefile defaults to several default paths for installed files. Adjust to your system: - `INSTALL_DIR`: PATH for executables (default /usr/local/bin) -- `CONFIG_DIR`: PATH for todo.txt config +- `CONFIG_DIR`: PATH for the todo.txt configuration template - `BASH_COMPLETION`: PATH for autocompletion scripts (default to /etc/bash_completion.d) ```shell From 273c465af050ac26456e0c29d05ec401a3cc2af7 Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Mon, 28 Mar 2022 22:24:49 +0200 Subject: [PATCH 3/4] Documentation: Add Configuration section with overview and recommendation to copy the template --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 8cd987d..594cb9e 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,11 @@ make install CONFIG_DIR=/etc INSTALL_DIR=/usr/bin BASH_COMPLETION=/usr/share/bas https://aur.archlinux.org/packages/todotxt/ +## Configuration + +No configuration is required; however, most users tweak the default settings (e.g. relocating the todo.txt directory to a subdirectory of the user's home directory, or onto a cloud drive (via the `TODO_DIR` variable)), modify the colors, add additional highlighting of projects, contexts, dates, and so on. A configuration template with a commented-out list of all available options is included. +It is recommended to _copy_ that template into one of the locations listed by `todo.sh help` on `-d CONFIG_FILE`, even if it is installed in the global configuration location (`/etc/todo/config`). + ## Usage ```shell todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description] From 491979b76a9505b098b57fb042a510f9e89feb5b Mon Sep 17 00:00:00 2001 From: Ingo Karkat Date: Sat, 7 May 2022 20:03:48 +0200 Subject: [PATCH 4/4] Renaming: Add .sh extension to completion script This doesn't matter if (as currently recommended) the script is placed into a eagerly loaded location (like /etc/bash_completion.d/) - any name will do. However, there's now lazy loading of completion scripts (in /usr/share/bash-completion/completions/), and that only works when the completion script is named exactly like the command the completion is for. As our command is todo.sh (ignoring aliases, which become more complex with lazy loading), the corresponding completion needs to be todo.sh (with the .sh extension) as well. Renaming does not do any harm for our recommended location, but makes it easier for users (and packagers who prepare a todo.sh package) that want to use lazy loading. See https://github.com/todotxt/todo.txt-cli/issues/383 for the complete discussion. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b6056bc..d498004 100644 --- a/Makefile +++ b/Makefile @@ -64,7 +64,7 @@ clean: test-pre-clean install: installdirs $(INSTALL_PROGRAM) todo.sh $(DESTDIR)$(bindir)/todo.sh - $(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/todo + $(INSTALL_DATA) todo_completion $(DESTDIR)$(datarootdir)/todo.sh [ -e $(DESTDIR)$(sysconfdir)/todo/config ] || \ sed "s/^\(export[ \t]*TODO_DIR=\).*/\1~\/.todo/" todo.cfg > $(DESTDIR)$(sysconfdir)/todo/config