mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
todo: update config; refactor actions
This commit is contained in:
parent
d5d6748eb3
commit
b68db8cdc1
5 changed files with 17 additions and 4 deletions
|
|
@ -21,6 +21,6 @@ for context in $CONTEXTS ; do
|
|||
CONTEXT_LIST=$(_list "$TODO_FILE" "@$context\b" "$@" | sed 's/\ *@[a-zA-Z0-9._\-]*\ */ /g')
|
||||
if [[ -n "${CONTEXT_LIST}" ]]; then
|
||||
echo -e "--@${context}"
|
||||
echo "${CONTEXT_LIST}" | eval $TODOTXT_FINAL_FILTER
|
||||
echo "${CONTEXT_LIST}" | eval "$TODOTXT_FINAL_FILTER"
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
3
config/todo/actions/e
Executable file
3
config/todo/actions/e
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
$EDITOR "$TODO_FILE"
|
||||
3
config/todo/actions/next
Executable file
3
config/todo/actions/next
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
exec "$TODO_SH" @ next
|
||||
|
|
@ -8,8 +8,13 @@ if [[ $action == "usage" ]]; then
|
|||
fi
|
||||
|
||||
item=$1
|
||||
if [[ $item == "" ]]; then
|
||||
TODOTXT_VERBOSE=0 $TODO_FULL_SH ls @url
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [[ ! "$item" =~ ^[0-9]+$ ]]; then
|
||||
echo "$item: invalid item number"
|
||||
echo "provided [task_number] is invalid: $item"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
@ -21,7 +26,7 @@ if [[ -z "$URL" ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! "#URL" =~ ^(?!https?:\/\/) ]]; then
|
||||
if [[ ! "$URL" =~ ^(?!https?:\/\/) ]]; then
|
||||
URL="https://$URL"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue