1
0
Fork 0
mirror of synced 2024-11-22 15:25:34 -05:00

Scope local variable in anonymous function

so it does not leek into the shell.

Copied from zimfw/git@fea95a7655
This commit is contained in:
Eric Nielsen 2019-05-31 19:23:34 -05:00
parent 507f5d58e0
commit accabdb18b

View file

@ -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 .)"'
}