From: Oleg Broytman Date: Tue, 15 Mar 2016 23:57:49 +0000 (+0300) Subject: .gitconfig: add `alias' and `aliases' aliases X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=b78e7fce5938e22b9a23a9fa4e726bed30e2793f;p=dotfiles.git .gitconfig: add `alias' and `aliases' aliases --- diff --git a/.gitconfig b/.gitconfig index 9301b8e..41e7f8a 100644 --- a/.gitconfig +++ b/.gitconfig @@ -1,4 +1,6 @@ [alias] + alias = "!f() { [ $# = 2 ] && git config --global alias.\"$1\" \"$2\" && return 0 || echo \"Usage: git alias \" >&2 && return 1; }; f" + aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' b = branch branches = branch -a camend = commit --amend -C HEAD