From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6392 invoked from network); 10 Apr 2001 07:50:44 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Apr 2001 07:50:44 -0000 Received: (qmail 28816 invoked by alias); 10 Apr 2001 07:50:34 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3814 Received: (qmail 28801 invoked from network); 10 Apr 2001 07:50:33 -0000 From: "Bart Schaefer" Message-Id: <1010410074845.ZM14908@candle.brasslantern.com> Date: Tue, 10 Apr 2001 07:48:45 +0000 In-Reply-To: <20010410044321.3457.qmail@web10408.mail.yahoo.com> Comments: In reply to Felix Rosencrantz "Re: Fix up the history upon "fg"" (Apr 9, 9:43pm) References: <20010410044321.3457.qmail@web10408.mail.yahoo.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers Subject: Re: Fix up the history upon "fg" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 9, 9:43pm, Felix Rosencrantz wrote: } Subject: Re: Fix up the history upon "fg" } } That's a pretty useful function. I guess I would sort of also like the } inverse function, you type a command, and if the same command line is } already running (including same CWD) the shell does a fg rather than } run the command. A slightly extended version of `setopt auto_resume'. You'd need to have preexec stash the command line for you somewhere, so that you could compare against $jobtexts inside the wrapper function. You need the alias-expanded command line (see Wayne's recent patch in 13933). } It would be nice if zsh could store the CWD information along with the } history. Cutesy trick: precmd() { local bufstack read -z bufstack && print -z "$bufstack" || print -z ": $PWD; " } -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net