#!/usr/bin/env bash # ╭──────────────────────────────────────────────────────────╮ # │ Interactivie Issue management of tea │ # ╰──────────────────────────────────────────────────────────╯ # ──────────────────────────────────────────────────────────── tea_cache="$(mktemp --directory)" # TODO: Add more keybindings to interact with issues tea i -o simple | fzf \ --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_cache"