Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'For the zsh users in the audience...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
For the zsh users in the audience...
Authored by: sabi on Dec 22, '01 03:22:17AM

This is my prompt:

prompt="{%U%n#%l@%m:%h%u} %30<...<%~%#"

which produces something like this:

{nicholas#p4@rattle:3} ~% cd /System/Library/Frameworks/
{nicholas#p4@rattle:4} /System/Library/Frameworks%cd LDAP.framework/
{nicholas#p4@rattle:5} ...y/Frameworks/LDAP.framework%

Of course, replace the 30 with another number if you want to truncate at a different length.

When I can put most everything else in the window title, I have an abbreviated version:

prompt="[%U%l:%h%u] %~%#"

This one doesn't do truncation as I haven't found it necessary, but it wouldn't be hard.



[ Reply to This | # ]