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

Re: passing a zsh option when opening an xterm



On Fri, Nov 14, 2014 at 02:37:45PM +0000, Stephane Chazelas wrote:
> 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

Hi,

apparently (( $(ps -o sid= -p $$) == $$ )) is always true, either when
launching xterms from ~/.xession (those I want ignoreeof) or later
through an openbox key mapping (not ignoreeof).

What do you mean by session leader?



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