Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housekeeping: Combined PR of all of my outstanding PRs. #405

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Commits on Sep 16, 2021

  1. Tests: Refactoring: Extract make_dummy_action()

    The action script creation in both test helper functions is pretty similar; extract a function for that so that the invocation is a single command.
    inkarkat committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    7792006 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1185ab1 View commit details
    Browse the repository at this point in the history
  3. Robustness: Check for broken symlinks to custom actions and complain

    Instead of potentially falling back to the built-in action that a custom action was intended to override, but (e.g. due to file system reorganizations) now results in a broken link. The extension functionality that is then skipped may result in undesired results, but this may not be immedately obvious to the user (if the extension is not particularly verbose), so some data corruption could occur if this remains undetected.
    To avoid duplicating (or somehow extracting) all the built-in actions, simply detect _any_ broken symlink; i.e. offer a superset of the required functionality. So this would also complain about a broken symlink to a non-executable custom (auxiliary) file (rarely used) if that is mistakenly passed as a custom action (unlikely).
    
    Fixes todotxt#359
    inkarkat committed Sep 16, 2021
    Configuration menu
    Copy the full SHA
    e1c1c32 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2021

  1. 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. todotxt#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.
    inkarkat committed Oct 9, 2021
    Configuration menu
    Copy the full SHA
    bd88c20 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2022

  1. Documentation: Clarify that CONFIG_DIR is for the configuration template

    And only coincidentally picked up as the global configuration (if CONFIG_DIR=/etc).
    
    Fixes todotxt#377
    inkarkat committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    7a4da60 View commit details
    Browse the repository at this point in the history
  2. Documentation: Add Configuration section with overview and recommenda…

    …tion to copy the template
    inkarkat committed Mar 28, 2022
    Configuration menu
    Copy the full SHA
    273c465 View commit details
    Browse the repository at this point in the history

Commits on Apr 12, 2022

  1. Refactoring: Replace shellquote() with printf %q

    I didn't know about printf's capability when I introduced quoting 10 years ago. The %q format will do the quoting, and "-v VAR" can be used to reassign to the variable.
    
    Note: The shellquote() function has been exported for reuse by add-ons. I don't think anyone has ever used that (it was mostly intended for my own, extensive extensions, and I never used it), and is trivial to move away from, anyway.
    inkarkat committed Apr 12, 2022
    Configuration menu
    Copy the full SHA
    aef7d8b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bf001ce View commit details
    Browse the repository at this point in the history

Commits on May 7, 2022

  1. 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 todotxt#383 for the complete discussion.
    inkarkat committed May 7, 2022
    Configuration menu
    Copy the full SHA
    491979b View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2022

  1. replace: Completely merge given priority / date with existing

    So that any combination of priority / date entered in the replacement will replace the corresponding original ones, but if they are left out, the original ones will be kept.
    In essence, omitted stuff will be kept, added stuff will override, only deletion of existing stuff is not possible (but this is replace, after all).
    
    Fixes todotxt#386
    inkarkat committed Jun 17, 2022
    Configuration menu
    Copy the full SHA
    2852385 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b25c791 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2022

  1. test listaddons: Make pass on Cygwin

    If a custom action cannot be made non-executable, it needs to be removed as well (and the test skipped); otherwise its existence will break following tests that assume it's inactive.
    Pegasust authored and inkarkat committed Jun 18, 2022
    Configuration menu
    Copy the full SHA
    1a5600c View commit details
    Browse the repository at this point in the history
  2. Tests: Refactoring: Extract invalidate_action() into actions-test-lib

    We don't "shamelessly steal" code, we refactoring it ;-)
    inkarkat committed Jun 18, 2022
    Configuration menu
    Copy the full SHA
    bab2af9 View commit details
    Browse the repository at this point in the history
  3. Refactoring: Use read -p MSG instead of doing echo -n MSG separately

    I've seen strange readline editing behavior when the editing doesn't start at the first column: I can actually backspace into the prepended message (with Del, Ctrl-W or Ctrl-U), and then the whole edit becomes messed up.
    
    read can output a prompt on its own (hopefully in all versions of Bash that we aim to support - the tests will tell), and that doesn't have this problem, and it's also a bit cleaner and shorter.
    
    The prompt is only displayed if input is coming from a terminal. For the tests (currently only deletion and move confirmations are covered), this means that the prompt itself cannot be covered, and an empty line instead has to be expected. (On the positive side, this removes the ugly trick with $SPACE.)
    inkarkat committed Jun 18, 2022
    Configuration menu
    Copy the full SHA
    4662651 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4cd6822 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2023

  1. FIX: Use standard error for die() and dieWithHelp()

    By convention, error output should be printed to standard error, not standard out. Same for the usage help that may accompany the error message.
    inkarkat committed Jan 21, 2023
    Configuration menu
    Copy the full SHA
    8038819 View commit details
    Browse the repository at this point in the history
  2. Use die() / print to stderr for error conditions

    To indicate that something went wrong (e.g. the task already was unprioritized).
    Note: For actions that handle multiple ITEMs in a loop, we cannot use die() as that would abort processing of any following ITEM(s). Instead, use a status variable and set it to 1 on error, then exit at the end.
    inkarkat committed Jan 21, 2023
    Configuration menu
    Copy the full SHA
    ef419f3 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'fix/stderr'

    inkarkat committed Jan 21, 2023
    Configuration menu
    Copy the full SHA
    2937a8b View commit details
    Browse the repository at this point in the history

Commits on Jan 22, 2023

  1. Configuration menu
    Copy the full SHA
    884b5de View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2023

  1. Configuration menu
    Copy the full SHA
    ea17510 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. ENH: Allow concatenation of multiple priorities [-ranges] for listpri

    It can be useful to filter for non-consecutive priority ranges. By enforcing uppercase in that added syntax, overlap with general TERM(s) (e.g. "foo-bar") can be mostly avoided (and in the rare case of having to filter by all-uppercase TERM(s) one can always pass the default A-Z filter, anyway).
    inkarkat committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    ca444e4 View commit details
    Browse the repository at this point in the history