From: Andrew Main <zefram@tao.co.uk>
To: heiko_elger@arburg.com
Cc: zsh-users@math.gatech.edu
Subject: Re: show command in XTERM titlebar like function chpwd()
Date: Wed, 9 Jul 1997 09:32:54 +0100 (BST) [thread overview]
Message-ID: <199707090832.JAA03413@taos.demon.co.uk> (raw)
In-Reply-To: <00000449.@arburg.com> from "heiko_elger@arburg.com" at Jul 9, 97 08:43:37 am
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
prev parent reply other threads:[~1997-07-09 8:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-07-09 7:43 heiko_elger
1997-07-09 8:32 ` Andrew Main [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199707090832.JAA03413@taos.demon.co.uk \
--to=zefram@tao.co.uk \
--cc=heiko_elger@arburg.com \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).