Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug report: `setopt noaliases` not respected in `local` statement without assignment.
- X-seq: zsh-workers 45629
- From: Marlon Richert <marlon.richert@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Bug report: `setopt noaliases` not respected in `local` statement without assignment.
- Date: Thu, 26 Mar 2020 11:54:07 +0200
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Test case:
alias -g tail="multitail -Cs --follow-all"
f() {
setopt localoptions no_aliases
local tail
tail=1
echo $tail
}
g() {
setopt localoptions no_aliases
local tail=1
echo $tail
}
$ type -f f
f () {
setopt localoptions no_aliases
local multitail -Cs --follow-all
tail=1
echo $tail
}
$ type -f g
g () {
setopt localoptions no_aliases
local tail=1
echo $tail
}
As you can see, `setopt noaliases` works as expected in function `g` where
`local tail=1` is used, but not in function `f` where `local tail` is used
without an assignment statement.
See https://github.com/junegunn/fzf/issues/1938 for more info.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author