From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18698 invoked by alias); 19 Nov 2014 13:29:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19411 Received: (qmail 22765 invoked from network); 19 Nov 2014 13:29:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.2 Date: Wed, 19 Nov 2014 14:28:34 +0100 From: Louis-David Mitterrand To: zsh-users@zsh.org Subject: Re: passing a zsh option when opening an xterm Message-ID: <20141119132834.GA27323@apartia.fr> Mail-Followup-To: zsh-users@zsh.org References: <20141114122739.GA24113__32490.9376482994$1415968833$gmane$org@apartia.fr> <20141114143744.GA4054@chaz.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141114143744.GA4054@chaz.gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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?