From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26868 invoked from network); 22 May 1997 03:53:34 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 22 May 1997 03:53:34 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id XAA11212; Wed, 21 May 1997 23:43:02 -0400 (EDT) Resent-Date: Wed, 21 May 1997 23:37:15 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199705220329.XAA05045@hzoli.home> Subject: Re: Getting xterm title bar to display last command... In-Reply-To: <19970521193846.02664@pasta.stanford.edu> from Sam Ockman at "May 21, 97 07:38:46 pm" To: ockman@cs.stanford.edu (Sam Ockman) Date: Wed, 21 May 1997 23:29:19 -0400 (EDT) Cc: zsh-users@math.gatech.edu X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"0SyOe3.0.df2.gzxWp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/866 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > 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