From: Timothy Stone <registrant@petmystone.com>
To: zsh-users <zsh-users@sunsite.dk>
Subject: Prompt truncating...
Date: Fri, 30 Jun 2006 15:22:15 -0400 [thread overview]
Message-ID: <C67AB042-2CC5-4E49-B6EB-D952C36B014E@petmystone.com> (raw)
In-Reply-To: <20060630124048.GA18152@ulpmm.u-strasbg.fr>
-----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)
next prev parent reply other threads:[~2006-06-30 19:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-30 12:40 zsh libs Marc Chantreux
2006-06-30 12:56 ` Peter Stephenson
2006-06-30 16:27 ` Bart Schaefer
2006-06-30 18:22 ` Prompt truncating Timothy Stone
2006-06-30 19:22 ` Timothy Stone [this message]
2006-06-30 20:13 ` Prompt truncating... [CLOSED] Timothy Stone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C67AB042-2CC5-4E49-B6EB-D952C36B014E@petmystone.com \
--to=registrant@petmystone.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).