Skip to content

Instantly share code, notes, and snippets.

@kawarimidoll
Last active November 28, 2022 13:37
Show Gist options
  • Save kawarimidoll/03a562a7998c537d4c375454638faf39 to your computer and use it in GitHub Desktop.
Save kawarimidoll/03a562a7998c537d4c375454638faf39 to your computer and use it in GitHub Desktop.
edit or view gist by fzf and gh-cli
# define in your .bashrc or .zshrc
# fuzzy edit gist
fest() {
gh gist list "$@" | fzf --with-nth=-2,-4,-3,2..-5 | awk '{print $1}' \
| xargs --no-run-if-empty --open-tty gh gist edit
}
# view web gist
vest() {
gh gist list "$@" | fzf --with-nth=-2,-4,-3,2..-5 | awk '{print $1}' \
| xargs --no-run-if-empty gh gist view --web
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment