mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
todo: add action for opening urls in todos
This commit is contained in:
parent
e5f2273627
commit
4fe83e65e0
2 changed files with 39 additions and 0 deletions
|
|
@ -1,7 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
export TODOTXT_VERBOSE=0
|
||||
|
||||
action=$1
|
||||
shift
|
||||
|
||||
if [[ $action == "usage" ]]; then
|
||||
echo "@ [context]"
|
||||
echo " Lists all tasks with the given context."
|
||||
echo " If no context is given, lists all tasks categorized by their context."
|
||||
echo " If task has @someday, it won't be listed."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
CONTEXTS=$(grep -o '[^ ]*@[^ ]\+' "$TODO_FILE" | grep '^@' | sort -u | sed 's/^@//g' )
|
||||
for context in $CONTEXTS ; do
|
||||
if [[ $context == "someday" ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue