Skip to content

Commit

Permalink
Fixed list_aliases() function for Zsh. (Use alias instead of `alias…
Browse files Browse the repository at this point in the history
… -p`, and tweaked sed to support both output formats.)
  • Loading branch information
ndbroadbent committed May 8, 2012
1 parent 69a44f3 commit b50639f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/git/aliases_and_bindings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# _alias() ignores errors if alias is not defined. (from lib/scm_breeze.sh)

# Print formatted alias index
list_aliases() { alias -p | grep "$*" --color=never | sed -e 's/alias //' -e "s/='/::/" -e "s/'//g" | awk -F "::" '{ printf "\033[1;36m%15s \033[2;37m=>\033[0m %-8s\n",$1,$2}'; }
list_aliases() { alias | grep "$*" --color=never | sed -e 's/alias //' -e "s/=/::/" -e "s/'//g" | awk -F "::" '{ printf "\033[1;36m%15s \033[2;37m=>\033[0m %-8s\n",$1,$2}'; }
alias git_aliases="list_aliases git"

# Wrap git with the 'hub' github wrapper, if installed
Expand Down

0 comments on commit b50639f

Please sign in to comment.