zsh-workers
 help / color / mirror / code / Atom feed
* Bug report: `setopt noaliases` not respected in `local` statement without assignment.
@ 2020-03-26  9:54 Marlon Richert
  2020-03-26  9:59 ` Roman Perepelitsa
  0 siblings, 1 reply; 9+ messages in thread
From: Marlon Richert @ 2020-03-26  9:54 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-03-29 21:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26  9:54 Bug report: `setopt noaliases` not respected in `local` statement without assignment Marlon Richert
2020-03-26  9:59 ` Roman Perepelitsa
2020-03-26 10:27   ` Marlon Richert
2020-03-26 10:38     ` Roman Perepelitsa
2020-03-26 22:34       ` Daniel Shahaf
2020-03-29 10:24         ` Roman Perepelitsa
2020-03-29 20:47           ` Daniel Shahaf
2020-03-29 21:03             ` Roman Perepelitsa
2020-03-29 21:12               ` Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).