Created
July 26, 2017 23:51
-
-
Save fanaugen/1b7bc86295290decd84ca4e0f451fa24 to your computer and use it in GitHub Desktop.
fish abbreviation for each git alias
This file contains hidden or 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
# for each git alias of the form XX, create fish abbreviation gXX | |
function git_alias --desc "Add a git abbreviation" | |
abbr -a g$argv[1] git $argv[2] | |
end | |
for _alias in (git config --global --get-regexp '^alias\.*' | sed s/alias.//) | |
git_alias (string split -m1 ' ' "$_alias") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment