Skip to content

Instantly share code, notes, and snippets.

@fanaugen
Created July 26, 2017 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fanaugen/1b7bc86295290decd84ca4e0f451fa24 to your computer and use it in GitHub Desktop.
Save fanaugen/1b7bc86295290decd84ca4e0f451fa24 to your computer and use it in GitHub Desktop.
fish abbreviation for each git alias
# 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