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

Re: BUG: set -n in interactive shell (3.0-xxx)



>Small problem with no_exec option. If I per chance do 'set -n' in
>interactive (worse, login) shell *and* ignoreeof option is set, it is no
>more possible to leave the shell at all!!!
>^D is rejected and logout/exit are not executed.

Ten ^Ds will still exit.  This is a safety feature in case the terminal
*really* goes away, as opposed to the user manually sending EOF, but it
can also be used to log out.

>Probably, the option should be set only on command line (as with some
>other)? What do you think?

No.  Two reasons: first, the options that can only be set on the
command line are very special ones that determine where commands come
from (and hence can't be meaningfully changed).  Second, not accepting
`set -n` would make a traditional shenanigan involving .profile
impossible.

(There's also the trifling issue of POSIX conformance, but we tend not
to be too concerned about that here.)

-zefram



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