mirror of
https://github.com/jbranchaud/til
synced 2026-01-04 23:58:01 +00:00
Move notes higher up, it is most common command
This commit is contained in:
24
Taskfile.yml
24
Taskfile.yml
@@ -11,6 +11,18 @@ tasks:
|
|||||||
cmds:
|
cmds:
|
||||||
- task --list
|
- task --list
|
||||||
|
|
||||||
|
notes:
|
||||||
|
desc: Interactive picker for notes tasks
|
||||||
|
cmds:
|
||||||
|
- |
|
||||||
|
TASK=$(task --list | grep "^\* notes:" | sed 's/^\* notes://' | sed 's/\s\+/ - /' | fzf --prompt="Select notes task: " --height=40% --reverse) || true
|
||||||
|
if [ -n "$TASK" ]; then
|
||||||
|
TASK_NAME=$(echo "$TASK" | awk '{print $1}' | sed 's/:$//')
|
||||||
|
task notes:$TASK_NAME
|
||||||
|
fi
|
||||||
|
interactive: true
|
||||||
|
silent: true
|
||||||
|
|
||||||
notes:sync:
|
notes:sync:
|
||||||
desc: Sync latest changes from the notes submodule
|
desc: Sync latest changes from the notes submodule
|
||||||
cmds:
|
cmds:
|
||||||
@@ -62,15 +74,3 @@ tasks:
|
|||||||
dir: '{{.NOTES_DIR}}'
|
dir: '{{.NOTES_DIR}}'
|
||||||
cmds:
|
cmds:
|
||||||
- git log --oneline -10
|
- git log --oneline -10
|
||||||
|
|
||||||
notes:
|
|
||||||
desc: Interactive picker for notes tasks
|
|
||||||
cmds:
|
|
||||||
- |
|
|
||||||
TASK=$(task --list | grep "^\* notes:" | sed 's/^\* notes://' | sed 's/\s\+/ - /' | fzf --prompt="Select notes task: " --height=40% --reverse) || true
|
|
||||||
if [ -n "$TASK" ]; then
|
|
||||||
TASK_NAME=$(echo "$TASK" | awk '{print $1}' | sed 's/:$//')
|
|
||||||
task notes:$TASK_NAME
|
|
||||||
fi
|
|
||||||
interactive: true
|
|
||||||
silent: true
|
|
||||||
|
|||||||
Reference in New Issue
Block a user