]> Tony Duckles's Git Repositories (git.nynim.org) - dotfiles.git/blob - bin/git-alias
.bashrc: Sync GREP_COLORS with ackrc colors
[dotfiles.git] / bin / git-alias
1 #!/bin/sh
2 # Usage: git-alias [<alias> [<value>]]
3 # Show/add aliases.
4
5 case $# in
6 0) git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort ;;
7 1) git alias | grep -e "$1" ;;
8 *) git config --global "alias.$1" "$2" ;;
9 esac