Last active
November 28, 2022 13:37
-
-
Save kawarimidoll/03a562a7998c537d4c375454638faf39 to your computer and use it in GitHub Desktop.
edit or view gist by fzf and gh-cli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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