[nycbug-talk] PROMPT_COMMAND in zsh?

Scott Robbins scottro
Sun Jun 26 22:06:49 EDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Jun 26, 2005 at 05:22:58PM -0400, George Georgalis wrote:
> I'm trying to find a "bash PROMPT_COMMAND" equivalant for zsh,
> eg in bash I use...
> 
> # If this is an xterm set the title to user at host:dir
> case $TERM in
>   xterm*)
>     PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
>     ;;
>   *)
>     ;;

> esac
> 
> 
> in my bashrc ...which is handy, is there a way in zsh?


I just do a PS1 in my .zshrc.  Of course, the first time I ran the man
page, I misunderstood and my prompt looked like

${PWD}%

Ooops.

Anyway, I have a page that goes into it.

http://www.qnd-guides.org/qnd-prompt.html

There's a few differences in syntax, and to be even nicer I tell ya
where to go in the man page to find it.  :)


- -- 

Scott Robbins

PGP keyID EB3467D6
( 1B48 077D 66F6 9DB0 FDC2 A409 FA54 EB34 67D6 )
gpg --keyserver pgp.mit.edu --recv-keys EB3467D6

Giles: I need you to take Spike for a few days. 
Xander: What? 
Spike: What? 
Anya: What? 
Spike: I'm not stayin' with him. 
Giles: I have a friend who's coming to town, and I'd like us to 
be alone. 
Anya: Oh, you mean an orgasm friend? 
Giles: Yes, that's exactly the most appalling thing you could 
have said. 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFCv185+lTVdes0Z9YRAhWSAJwPQQhZCModJ/N2t1c8Y3fvwv54lgCaA+Ld
Cox8a1ENKyFakSTfaGeW1DE=
=M9dj
-----END PGP SIGNATURE-----




More information about the talk mailing list