Skip to content

Instantly share code, notes, and snippets.

@fdavidcl
Created October 15, 2014 18:39
Show Gist options
  • Save fdavidcl/c9e90574e6eac959286c to your computer and use it in GitHub Desktop.
Save fdavidcl/c9e90574e6eac959286c to your computer and use it in GitHub Desktop.
TODO
# .bash_aliases
# Usage:
# todo - Shows tasks
# todo "New task" - Adds task to TODO list
# todo do 2 - Deletes 2nd task
function todo() {
[[ $# -ge 1 ]] && (
[[ $# -ge 2 ]] && (
cp ~/.TODO ~/.TODO.old
sed "$2d" ~/.TODO.old > ~/.TODO
) || (
echo $1 >> ~/.TODO
)
)
nl ~/.TODO
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment