Skip to content

Instantly share code, notes, and snippets.

@dmikis
Created April 16, 2013 11:28
Show Gist options
  • Save dmikis/5395233 to your computer and use it in GitHub Desktop.
Save dmikis/5395233 to your computer and use it in GitHub Desktop.
function get_todo_status {
TODO_COUNT=
local FILE_LINE_COUNT=0
[[ -f "$HOME/.todo" ]] && FILE_LINE_COUNT=$(cat "$HOME/.todo" | wc -l)
[[ $FILE_LINE_COUNT -ne "0" ]] && TODO_COUNT=$FILE_LINE_COUNT
}
function todos {
[[ -f "$HOME/.todo" ]] && cat -n "$HOME/.todo"
}
function todone {
[[ -f "$HOME/.todo" ]] && sed -i "$1d" "$HOME/.todo"
}
function todonew {
echo $@ >> "$HOME/.todo"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment