Created
April 28, 2022 16:46
-
-
Save corytheboyd/6f0ba4a798ece47ae0d2332933789cb2 to your computer and use it in GitHub Desktop.
My custom ZSH additions
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
# ###################### | |
# 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