Scope local variable in anonymous function
so it does not leek into the shell. Copied from zimfw/git@fea95a7655
This commit is contained in:
parent
507f5d58e0
commit
accabdb18b
1 changed files with 156 additions and 154 deletions
|
@ -16,6 +16,7 @@ _git_log_oneline_medium_format='%C(bold yellow)%h%C(reset) %<(50,trunc)%s %C(bol
|
|||
# Aliases
|
||||
#
|
||||
|
||||
() {
|
||||
local gprefix
|
||||
zstyle -s ':zim:git' aliases-prefix 'gprefix' || gprefix=g
|
||||
|
||||
|
@ -188,3 +189,4 @@ alias ${gprefix}wX='git rm -rf'
|
|||
|
||||
# Misc
|
||||
alias ${gprefix}..='cd "$(git-root || print .)"'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue