add zk workflow

fixes #1
This commit is contained in:
Alexander Navarro 2024-09-12 16:55:05 -03:00
parent 595ac566ea
commit 8b85cf7c9e
Signed by untrusted user who does not match committer: anavarro
GPG key ID: 6426043E9FA3E3B5
12 changed files with 373 additions and 47 deletions

View file

@ -6,15 +6,13 @@
# ────────────────────────────────────────────────────────────
tea_issue_cache="/tmp/tea-issue-cache"
mkdir -p "$tea_issue_cache"
tea_cache="$(mktemp --directory)"
# TODO: Add more keybindings to interact with issues
tea i -o simple |
fzf \
--preview "[[ -e $tea_issue_cache/{1} ]] && cat $tea_issue_cache/{1} || tea issue --comments {1} | tee $tea_issue_cache/{1}" \
--bind "ctrl-r:execute-silent(rm -f $tea_issue_cache/{1})+refresh-preview" \
--preview "[[ -e $tea_cache/{1}.md ]] && bat -l md $tea_cache/{1}.md || tea issue --comments {1} | tee $tea_cache/{1}.md" \
--bind "ctrl-r:execute-silent(rm -f $tea_cache/{1})+refresh-preview" \
--bind "ctrl-o:execute-silent(tea open {1})"
rm -rf "$tea_issue_cache"
rm -rf "$tea_cache"