mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-25 15:20:08 +00:00
Update to inline conditional syntax
This commit is contained in:
parent
308b046875
commit
1bd72f588c
1 changed files with 6 additions and 6 deletions
|
@ -33,11 +33,6 @@ function work_in_progress() {
|
|||
fi
|
||||
}
|
||||
|
||||
function _omz_git_stash_command() {
|
||||
[[ `git --version 2>/dev/null` =~ '^git version ([[:digit:]]+.[[:digit:]]+)' && "$match[1]" >= '2.13' ]] \
|
||||
&& echo push || echo save
|
||||
}
|
||||
|
||||
#
|
||||
# Aliases
|
||||
# (sorted alphabetically)
|
||||
|
@ -243,7 +238,12 @@ alias gsps='git show --pretty=short --show-signature'
|
|||
alias gsr='git svn rebase'
|
||||
alias gss='git status -s'
|
||||
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 gstc='git stash clear'
|
||||
alias gstd='git stash drop'
|
||||
|
|
Loading…
Reference in a new issue