From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4495 invoked from network); 22 May 1997 17:37:38 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 22 May 1997 17:37:38 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id NAA04016; Thu, 22 May 1997 13:19:14 -0400 (EDT) Resent-Date: Thu, 22 May 1997 13:11:07 -0400 (EDT) Sender: gjb@cs.washington.edu To: Zoltan Hidvegi Cc: ockman@cs.stanford.edu (Sam Ockman), zsh-users@math.gatech.edu Subject: Re: Getting xterm title bar to display last command... References: <199705220329.XAA05045@hzoli.home> From: Greg Badros Date: 22 May 1997 10:14:40 -0700 In-Reply-To: Zoltan Hidvegi's message of Wed, 21 May 1997 23:29:19 -0400 (EDT) Message-ID: X-Mailer: Gnus v5.4.11/Emacs 19.33 Resent-Message-ID: <"XrSf33.0.2x.gu7Xp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/869 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zoltan Hidvegi writes: > > Okay, so I have the neat function from the zsh web site to get my xterm to > > display the current directory....Anyone know how to use that basic idea to > > get my xterm to display the last thing entered at the command line > > instead? > > In zsh-3.1.2 (coming soon), thanks to Zefram, you can do: > > zle -N my-accept-line > my-accept-line () { print -nr -- "^[]2;$BUFFER^G"; zle accept-line; } > bindkey '^M' my-accept-line > > Note that you have to type real ESC and CTRL-G instead of ^[ and ^G. In > zsh-3.0, and probably in zsh-3.1.1 too, there is no way to do that. > > Zoltan My colorized listing and postprompt patch does this for Zsh-3.0.2. You set PPTMOUT to the number of seconds to wait before displaying the string, and set POSTPROMPT to the string to display (including the escape characters). Note that this has the advantage that only commands that are running for a certain length get displayed. It has the disadvantage of the possibility (very very rare when you use an xterm control sequence) of mixing output with the running program. (not a problem if running program sends output to a file). See the patches on my web page, ../gjb/patches Greg J. Badros gjb@cs.washington.edu Seattle, WA USA http://www.cs.washington.edu/homes/gjb