From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15735 invoked from network); 9 Jul 1997 08:42:50 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 9 Jul 1997 08:42:50 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA01492; Wed, 9 Jul 1997 04:30:29 -0400 (EDT) Resent-Date: Wed, 9 Jul 1997 04:28:44 -0400 (EDT) From: Andrew Main Message-Id: <199707090832.JAA03413@taos.demon.co.uk> Subject: Re: show command in XTERM titlebar like function chpwd() To: heiko_elger@arburg.com Date: Wed, 9 Jul 1997 09:32:54 +0100 (BST) Cc: zsh-users@math.gatech.edu In-Reply-To: <00000449.@arburg.com> from "heiko_elger@arburg.com" at Jul 9, 97 08:43:37 am X-Loop: zefram@tao.co.uk X-Headers: in preparation X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"3OfG61.0.OM.ykqmp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/938 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu heiko_elger@arburg.com wrote: > is it possible to use own functions (like run-help) with the bindkey > command? It is now (3.1.2). > I want to update my XTERM title bar every time I'll press then ENTER > key. I want to have the command name which is executing in the title > bar. The best way to do this is not to bind a new function to ENTER, but to redefine accept-line: accept-line () { local cmd=${BUFFER%%" "*} [[ -n "$cmd" && $TERM == xterm* ]] && print -nR "executing: $cmd" zle .accept-line } zle -N accept-line Replace the print argument with whatever sequence is required for the xterm titlebar. -zefram