Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: zsh 4.0.4 and precmd
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: zsh 4.0.4 and precmd



"Robert C. Jacobson" wrote:
>
> At 12:48 PM +1000 9/18/02, Andrew White wrote:
> >I'm running OS X 10.2, Darwin 6, zsh 4.0.4 and terminal.
> >
> >Under previous versions of terminal, I could issue the command:
> >
> >print -Pn "\e]0;%n@%m:%~"
> >
> >and it would set the title of the terminal to:
> >
> >me@box:~/my/current/path
> >
> >Stick this in precmd and the title of terminal would track the path -
> >very useful. Under 10.2 it doesn't work.
> >
>
> How about using chpwd() instead of precmd()?

Yep. Putting it in chpwd seems a much better idea.

However, it doesn't solve the fundamental problem (which might be more OS X
than darwin). The call to precmd works. Printing the string to the console
(print -P "%b@%m:%~") works. However, the escaped string doesn't cause the
title of the terminal to change.

Did they change something between 10.1.5 and 10.2, so that the escape
sequence doesn't work?

Admission: I copied the code off someone else on this list, so I don't even
understand WHY the escape sequence used to work. If someone knows where
such is documented, I'd appreciate it.

--
Andrew White
_______________________________________________
darwinos-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwinos-users
Do not post admin requests to the list. They will be ignored.

References: 
 >zsh 4.0.4 and precmd (From: Andrew White <email@hidden>)
 >Re: zsh 4.0.4 and precmd (From: "Robert C. Jacobson" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.