1
0
Fork 0
mirror of synced 2024-05-28 21:11:12 -04: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 # Aliases
# #
() {
local gprefix local gprefix
zstyle -s ':zim:git' aliases-prefix 'gprefix' || gprefix=g zstyle -s ':zim:git' aliases-prefix 'gprefix' || gprefix=g
@ -188,3 +189,4 @@ alias ${gprefix}wX='git rm -rf'
# Misc # Misc
alias ${gprefix}..='cd "$(git-root || print .)"' alias ${gprefix}..='cd "$(git-root || print .)"'
}