zsh-workers
 help / color / mirror / code / Atom feed
From: Andrew J Cosgriff <ajc@unico.com.au>
To: "Greg J. Badros" <gjb@moa.cs.duke.edu>
Cc: zsh-workers@math.gatech.edu
Subject: Re: Zsh "POSTPROMPT" Feature
Date: Sun, 26 May 1996 09:01:21 +1000	[thread overview]
Message-ID: <199605252301.JAA04006@ufo.unico.com.au> (raw)
In-Reply-To: gjb's message of Sat, 25 May 1996 13:20:22 -0400. <Pine.SOL.3.93.960525130209.22483A-200000@moa.cs.duke.edu>


"Greg J. Badros" <gjb@moa.cs.duke.edu> wrote:
>  One feature that I've not seen talked about but that would be useful
>(mostly in an X environment) is the addition of a POSTPROMPT variable.  I
>have patches for zsh-2.5.03 that implement this, and then my .zshrc sets 
>my POSTPROMPT to
>{%^[]0;%H^G%}
>(Where ^[ is ESC, ^G is Ctrl-G-- the xterm sequence for setting the title
>and icon). [The %H is a change to print the last/current history item].

Well, if you just want to keep track of your current directory in your title bar, there's no need to patch zsh...For a start it's a little more efficient to only change your xterm title when you need to - ie. when you change directory - this can be done with the "chpwd" function, like so :

chpwd () {
        local dir=`print -D ${PWD}`
        local title=${LOGNAME}@$(uname -n):$dir
        print -n -D -P "\033]2;${title}\007"
}

Enjoy,
 Andrew.
-- 
 - Andrew J Cosgriff - ajc@bing.wattle.id.au -          Mobile : +61-14-856-122
 SysAdmin / Support Dude, UNICO Computer Systems    PGP & MIME ok and preferred
                        "Your future is encoded in Pi."





  reply	other threads:[~1996-05-25 23:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-05-25 17:20 Greg J. Badros
1996-05-25 23:01 ` Andrew J Cosgriff [this message]
1996-05-26  0:33   ` Hrvoje Niksic

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=199605252301.JAA04006@ufo.unico.com.au \
    --to=ajc@unico.com.au \
    --cc=gjb@moa.cs.duke.edu \
    --cc=zsh-workers@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).