Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Prompt truncating...



-----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-----


--
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)




Messages sorted by: Reverse Date, Date, Thread, Author