Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Prompt truncating...
- X-seq: zsh-users 10459
- From: Timothy Stone <registrant@xxxxxxxxxxxxxx>
- To: zsh-users <zsh-users@xxxxxxxxxx>
- Subject: Prompt truncating...
- Date: Fri, 30 Jun 2006 14:22:14 -0400
- In-reply-to: <20060630124048.GA18152@xxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060630124048.GA18152@xxxxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
/From Bash to Z Shell/ has a great chapter on truncating the path in
the prompt for ZSH.
There is some illusion to truncation "by segment" vs. total length:
"...The example therefore shows you how to limit the amount of a
directory printed by the total number of characters rather than by
the numbers of segments in the path."
Page 157-156, Chapter 7
So how to by segment? Is it in the Bash section of this chapter? I
skipped that part. :)
How I do it in tcsh now:
if ($?prompt) then
set prompt = "%n@%m %B[%b%c03%B]%b %% " # doesn't want to work
in ZSH
set cdpath = (~ ~/Documents ~/Projects)
set ellipsis
endif
Basically, total length is nice, but not as nice as by segment, IMHO.
Thanks,
Tim
- --
Timothy Stone | www dot petmystone dot com
Rising Sun, MD | tstone at petmystone dot com
"This Satan's drink [coffee] is so delicious...
we shall cheat Satan by baptizing it."
Pope Clement VIII (1592-1605)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
iD8DBQFEpWvmlNb2aYI3YNkRAuh2AJwPVHakUoAAcCAhD6AvpGKu7QKCnQCePx0p
PYvgRibKMvIa32K4D8KzrF0=
=NhAZ
-----END PGP SIGNATURE-----
Messages sorted by:
Reverse Date,
Date,
Thread,
Author