From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13984 invoked from network); 30 Nov 2008 04:31:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 30 Nov 2008 04:31:55 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 82373 invoked from network); 30 Nov 2008 04:31:51 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Nov 2008 04:31:51 -0000 Received: (qmail 18549 invoked by alias); 30 Nov 2008 04:31:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26097 Received: (qmail 18538 invoked from network); 30 Nov 2008 04:31:45 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Nov 2008 04:31:45 -0000 Received: from vms042pub.verizon.net (vms042pub.verizon.net [206.46.252.42]) by bifrost.dotsrc.org (Postfix) with ESMTP id 4898380525B6 for ; Sun, 30 Nov 2008 05:31:37 +0100 (CET) Received: from torch.brasslantern.com ([96.238.220.215]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KB4000KIPWOS4I1@vms042.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 29 Nov 2008 22:31:37 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id mAU4VZoX006273 for ; Sat, 29 Nov 2008 20:31:36 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id mAU4VZSP006272 for zsh-workers@sunsite.dk; Sat, 29 Nov 2008 20:31:35 -0800 Date: Sat, 29 Nov 2008 20:31:35 -0800 From: Bart Schaefer Subject: Re: Seg. Fault when calling "cd" with set "chpwd" hook from a widget In-reply-to: <20081125000535.GC30055@unknown> To: zsh-workers@sunsite.dk Message-id: <081129203135.ZM6271@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20081125000535.GC30055@unknown> Comments: In reply to Jonas Kramer "Seg. Fault when calling "cd" with set "chpwd" hook from a widget" (Nov 25, 1:05am) X-Virus-Scanned: ClamAV 0.92.1/8696/Sat Nov 29 09:01:59 2008 on bifrost X-Virus-Status: Clean On Nov 25, 1:05am, Jonas Kramer wrote: > > # Control + B jumps to "base" directory. > function return-to-base; { Not directly pertinent, but what's the semicolon for? > function chpwd; { > DIRECTORY="$PWD" > while true; do > if [ -f './.env.rc' ]; then > source './.env.rc' > break > fi > if [ -f './env' ]; then > source './env' > break > fi > [ $PWD = '/' ] && break > cd -q .. > done > cd -q "$DIRECTORY" > } > > Now when BASE points to a directory that contains a .env.rc file and I > press ^B, it seems to work fine at first, the directory is updated and I > get a new nice prompt. But then, no matter what I enter, after hitting > return zsh crashes with a seg. fault. This seems to happen in > hist.c:1138, where hptr points to NULL at that point. Are there any commands in ./.env.rc or ./env that manipulate the history?