diff --git a/Creating-and-Installing-Add-ons.textile b/Creating-and-Installing-Add-ons.textile index ccfac0d..e225d9b 100644 --- a/Creating-and-Installing-Add-ons.textile +++ b/Creating-and-Installing-Add-ons.textile @@ -2,20 +2,19 @@ Todo.sh add-ons let you add new todo.sh actions or change (override) default act h2. Installing Add-ons -Add-ons must be installed into the .todo/actions/ sub-directory of your home directory. Create this directory with the following bash shell commands: +Add-ons can be installed into the $HOME/.todo.actions.d directory, or any other directory configured via $TODO_ACTIONS_DIR. Create this directory with the following bash shell commands:
-cd -mkdir .todo/actions +mkdir -p ~/.todo.actions.dYou must name add-ons after the action you want to add or override. For example, create a new "review" action by installing an add-on to -.todo/actions/review. After installing the add-on, you must make it +.todo.actions.d/review. After installing the add-on, you must make it executable; for example:
-chmod +x .todo/actions/review +chmod +x ~/.todo.actions.d/reviewUse the new or overridden action the normal todo.sh way. For example: @@ -74,12 +73,11 @@ h2. Aliasing Add-ons You may want to allow short aliases for those new commands (e.g. "pv" as alias for "projectview") -There is a small issue if you simply duplicate or symlink the add-on file: the corresponding help snippet will be duplicated as well in th eoutput of the todo.sh help command. To avoid that, you can create aliases by creating short add-ons such as this example (replace projectview by the command you want to call with your alias): +There is a small issue if you simply duplicate or symlink the add-on file: the corresponding help snippet will be duplicated as well in the output of the todo.sh help command. To avoid that, you can create aliases by creating short add-ons such as this example (replace projectview by the command you want to call with your alias): +
#!/bin/bash - [ "$1" = "usage" ] && exit 0 shift - -"$TODO_SH" projectview "$@" +"$TODO_FULL_SH" projectview "$@"