* Refactoring: Replace serial checks for `TODOTXT_CFG_FILE` and `TODO_ACTIONS_DIR` with loops Two fallbacks (like for the actions dir) may still be fine, but we're now supporting so many config locations that a loop is much shorter, and the various locations are much easier to see. For consistency, also apply this to the actions dir lookup, although it's less of a problem there. * Refactoring: Apply the first default for `TODOTXT_CFG_FILE` also in the loop There's no need to handle this separately; either an exported environment variable already exists, or it got assigned via `-d CONFIG_FILE`, or the `test -e` will fail on an empty (or bad non-existing) value, and we enter the fallback loop. * Mention the actual config file locations in the help for `-d` Extract the list of default locations into a `configFileLocations` array and join that into a string that then gets interpolated into the help output for `-d` (that so far only mentioned the first default location). * Comments: Don't favor a single config location in the requirement * Documentation: Mention `~/.todo/config` as just one of the defaults As there are several others, now shown in the help for `-d`. I don't want to duplicate the entire list here, as there's a high risk of those lists diverging. Fixes #342
A simple and extensible shell script for managing your todo.txt file.
Read our contributing guide if you're looking to contribute (issues/PRs/etc).
Installation
Download
Download the latest stable release for use on your desktop or server.
OS X / macOS
brew install todo-txt
cp -n /usr/local/opt/todo-txt/todo.cfg ~/.todo.cfg
Note: The -n flag for cp makes sure you do not overwrite an existing file.
Linux
From command line
make
make install
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 configBASH_COMPLETION: PATH for autocompletion scripts (default to /etc/bash_completion.d)
make install CONFIG_DIR=/etc INSTALL_DIR=/usr/bin BASH_COMPLETION=/usr/share/bash-completion/completions
Arch Linux (AUR)
https://aur.archlinux.org/packages/todotxt/
Usage
todo.sh [-fhpantvV] [-d todo_config] action [task_number] [task_description]
For example, to add a todo item, you can do:
todo.sh add "THING I NEED TO DO +project @context"
Read about all the possible commands in the USAGE file.
Release History
See CHANGELOG.md
Support
Code of Conduct
Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
Contributing
We welcome all contributations. First read our Contributor Code of Conduct and then get started contributing.
License
GNU General Public License v3.0 © todo.txt org

