mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Merge pull request #409 from nicolaiskogheim/refactor-alias
Refactor alias
This commit is contained in:
commit
3c5523617e
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue