Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
1bd72f58
Unverified
Commit
1bd72f58
authored
Apr 09, 2019
by
Marc Cornellà
Committed by
GitHub
Apr 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update to inline conditional syntax
parent
308b0468
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
git.plugin.zsh
plugins/git/git.plugin.zsh
+6
-6
No files found.
plugins/git/git.plugin.zsh
View file @
1bd72f58
...
@@ -33,11 +33,6 @@ function work_in_progress() {
...
@@ -33,11 +33,6 @@ function work_in_progress() {
fi
fi
}
}
function
_omz_git_stash_command
()
{
[[
`
git
--version
2>/dev/null
`
=
~
'^git version ([[:digit:]]+.[[:digit:]]+)'
&&
"
$match
[1]"
>=
'2.13'
]]
\
&&
echo
push
||
echo
save
}
#
#
# Aliases
# Aliases
# (sorted alphabetically)
# (sorted alphabetically)
...
@@ -243,7 +238,12 @@ alias gsps='git show --pretty=short --show-signature'
...
@@ -243,7 +238,12 @@ alias gsps='git show --pretty=short --show-signature'
alias
gsr
=
'git svn rebase'
alias
gsr
=
'git svn rebase'
alias
gss
=
'git status -s'
alias
gss
=
'git status -s'
alias
gst
=
'git status'
alias
gst
=
'git status'
alias
gsta
=
"git stash
$(
_omz_git_stash_command
)
"
# use the default stash push on git 2.13 and newer
[[
"
$(
git
--version
2>/dev/null
)
"
=
~
'^git version ([0-9]+.[0-9]+)'
&&
"
$match
"
-ge
'2.13'
]]
\
&&
alias
gsta
=
'git stash push'
||
alias
gsta
=
'git stash save'
alias
gstaa
=
'git stash apply'
alias
gstaa
=
'git stash apply'
alias
gstc
=
'git stash clear'
alias
gstc
=
'git stash clear'
alias
gstd
=
'git stash drop'
alias
gstd
=
'git stash drop'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment