1
0
mirror of https://github.com/jbranchaud/til synced 2026-07-06 01:00:35 +00:00

Add two new browsing tasks for popping open latest TIL in browser

This commit is contained in:
jbranchaud
2026-07-05 18:09:31 -05:00
parent 8c463a90e3
commit 5f4308c1af
+28
View File
@@ -11,6 +11,34 @@ tasks:
cmds: cmds:
- task --list - task --list
browse:
desc: Pick from 5 most recent TILs (fzf) and open in browser
cmds:
- |
FILE=$(git log --diff-filter=A --name-only --pretty=format: -- '*/*.md' \
| grep -v '^$' \
| awk '!seen[$0]++' \
| head -5 \
| fzf --prompt="Open TIL: " --height=40% --reverse) || true
if [ -n "$FILE" ]; then
gh browse "$FILE"
fi
interactive: true
silent: true
browse:latest:
desc: Open the single most recent TIL in the browser
cmds:
- |
FILE=$(git log --diff-filter=A --name-only --pretty=format: -- '*/*.md' \
| grep -v '^$' \
| awk '!seen[$0]++' \
| head -1)
if [ -n "$FILE" ]; then
gh browse "$FILE"
fi
silent: true
notes: notes:
desc: Interactive picker for notes tasks desc: Interactive picker for notes tasks
cmds: cmds: