Skip to content

Commit

Permalink
Merge pull request #409 from nicolaiskogheim/refactor-alias
Browse files Browse the repository at this point in the history
Refactor alias
hemanth committed Jul 29, 2015

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 3a8c947 + 9629fdf commit 3c55236
Showing 2 changed files with 10 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/git-alias
Original file line number Diff line number Diff line change
@@ -2,6 +2,6 @@

case $# in
0) git config --get-regexp 'alias.*' | sed 's/^alias\.//' | sed 's/[ ]/ = /' | sort ;;
1) git alias | grep -e -- "$1" ;;
*) git config --global "alias.$1" "$2" ;;
1) git alias | grep -e "$1" ;;
*) git config --global alias."$1" "$2" ;;
esac
13 changes: 8 additions & 5 deletions man/git-alias.md
Original file line number Diff line number Diff line change
@@ -3,13 +3,20 @@ git-alias(1) -- Define, search and show aliases

## SYNOPSIS

`git-alias` [<alias-name> <command>]|[<search-term>]
`git-alias`
`git-alias` <search-term>
`git-alias` <alias-name> <command>

## DESCRIPTION

List all aliases, show one alias, or set one (global) alias.

## OPTIONS

<search-term>

The pattern used for search aliases.

<alias-name>

The name of the alias to create.
@@ -18,10 +25,6 @@ git-alias(1) -- Define, search and show aliases

The command for which you are creating an alias.

<search-term>

The pattern used for search aliases.


## EXAMPLES

0 comments on commit 3c55236

Please sign in to comment.