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

err_return in initialization scripts returns from conditionals



Hi list,

Since recently (5.4.2?), there seems to be a bug involving err_return
during initialization.

If I have a .zshrc with the following content:

    setopt err_return
    true && function {
      if false; then :; fi
      echo 1
    }
    echo 2

Then the "if false" causes the function to return and "1" is not printed.
Note that the behavior differs from running this file using "zsh .zshrc",
where both lines are printed, which I expect is the intended behavior.

Greetings,
Jan Steffens


Messages sorted by: Reverse Date, Date, Thread, Author