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

Re: passing a zsh option when opening an xterm



2014-11-14 13:27:39 +0100, Louis-David Mitterrand:
[...]
> When opening my fixed xterm's from my desktop startup file I'd like them
> to not quit when accidentaly pressing CTRL-D.
> 
> How can I pass zsh's ignoreeof to the xterm?
> 
> (I don't want that option in my .zshrc as I like to terminate temporary
> xterm's with CTRL-D)
> 
> I tried "xterm -e zsh -i -7" which works but wondering if there is
> another way?
[...]

You could set ignoreeof only when zsh is a session leader:

In ~/.zshrc:

(( $(ps -o sid= -p $$) == $$ )) && setopt ignoreeof

-- 
Stephane



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