Skip to content

Instantly share code, notes, and snippets.

@corytheboyd
Created April 28, 2022 16:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corytheboyd/6f0ba4a798ece47ae0d2332933789cb2 to your computer and use it in GitHub Desktop.
Save corytheboyd/6f0ba4a798ece47ae0d2332933789cb2 to your computer and use it in GitHub Desktop.
My custom ZSH additions
# ######################
# MY CONFIGURATION START
# ######################
function be() {
bundle exec "$@"
}
function dgaf() {
git reset && \
git checkout . && \
git clean -df
}
function pick_branch_fzf() {
git branch \
--color \
--list \
--format="%(color:dim green)%(objectname:short) %(color:bold white)%(refname:short) %(color:italic red)%(subject) %(color:bold white)%(committerdate)" \
--sort -committerdate \
| \
fzf --ansi \
| \
awk '{ print $2 }'
}
function grhu() {
git reset --hard origin/$(git_current_branch)
}
function pem_file_to_base64() {
awk -v ORS='\\n' '1' "$1" | base64
}
function gbb() {
git checkout $(pick_branch_fzf)
}
# ######################
# MY CONFIGURATION END
# ######################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment