Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Bug report: `setopt noaliases` not respected in `local` statement without assignment.



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