* Re: PWD in prompt
@ 1999-02-05 23:36 Shawn Leas
0 siblings, 0 replies; 3+ messages in thread
From: Shawn Leas @ 1999-02-05 23:36 UTC (permalink / raw)
To: Matthew Lovell; +Cc: Zsh Users List
On Fri, 5 Feb 1999, Matthew Lovell wrote:
>
> I'm having an odd problem with zsh-3.1.5. My prompt definition is
> basically as follows:
>
> # set the prompt
> PROMPT=$(print "\%n\@\%m:\%~\\n%1v%% ");
Why the print statement?? Here's my whole setup, uncluding
xterm title setting...
PROMPT='%B[%l] %n@%m %1v %b(%B%h%b)%B %t%b '
if [[ $TERM = xterm || $TERM = vs100 || $TERM_PROGRAM = OS_Terminal ]] ; then
RPROMPT="%B(%~)%b%{^[]2;%n@%m:[%(7c|...%6c|%7c)]^G%}"
else
RPROMPT="%B(%~)%b"
fi
# RPROMPT="%B(%~)%b%{^[]2;%n@%m:[%(7c|...%6c|%7c)]^G%}"
function precmd {
setopt no_ksh_arrays local_options
case "${${$(uptime)##*"load average: "}%%,*}" in
0.[0-4]*) psvar[1]='%^)' ;;
0.[5-9]*) psvar[1]=';^]' ;;
1.*) psvar[1]=';^|' ;;
2.*) psvar[1]=':^|' ;;
3.*) psvar[1]=':^(' ;;
[45].*) psvar[1]=':^O' ;;
[67].*) psvar[1]='|-P' ;;
*) psvar[1]='|-(' ;;
esac
}
-Shawn
<=========== America Held Hostage ===========>
Day 2207 for the poor and the middle class.
Day 2226 for the rich and the dead.
715 days remaining in the Raw Deal.
<============================================>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: PWD in prompt
@ 1999-02-06 0:14 Matthew Lovell
0 siblings, 0 replies; 3+ messages in thread
From: Matthew Lovell @ 1999-02-06 0:14 UTC (permalink / raw)
To: Shawn Leas; +Cc: Zsh Users List
On 5 February 1999, Shawn Leas writes:
> On Fri, 5 Feb 1999, Matthew Lovell wrote:
>
> >
> > I'm having an odd problem with zsh-3.1.5. My prompt definition is
> > basically as follows:
> >
> > # set the prompt
> > PROMPT=$(print "\%n\@\%m:\%~\\n%1v%% ");
>
> Why the print statement?? Here's my whole setup, uncluding
> xterm title setting...
The prompt I gave is not my actual prompt. I typically include other
variables (color escape codes, set earlier in the script depending on
the value of TERM) which need to get interpolated before the
assignment to PROMPT.
As an interim solution, I've just unset autonamedirs.
--
Matthew Lovell voice: (970) 898-6264
Hewlett-Packard WSL fax: (970) 898-2510
3404 E. Harmony Rd. MS A0 location: 3UQ4
Fort Collins, CO 80528-9599 mailto:lovell@fc.hp.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* PWD in prompt
@ 1999-02-05 18:06 Matthew Lovell
0 siblings, 0 replies; 3+ messages in thread
From: Matthew Lovell @ 1999-02-05 18:06 UTC (permalink / raw)
To: Zsh Users List
I'm having an odd problem with zsh-3.1.5. My prompt definition is
basically as follows:
# set the prompt
PROMPT=$(print "\%n\@\%m:\%~\\n%1v%% ");
Under 3.1.5, the %~ is constantly getting expressed as ~PWD. It's not
very useful to know that I'm always in ~PWD. Is there anyway to
prevent this from happening, while still getting ~ "compression" when
appropriate?
Thanks,
Matt
--
Matthew Lovell voice: (970) 898-6264
Hewlett-Packard WSL fax: (970) 898-2510
3404 E. Harmony Rd. MS A0 location: 3UQ4
Fort Collins, CO 80528-9599 mailto:lovell@fc.hp.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-02-06 0:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-05 23:36 PWD in prompt Shawn Leas
-- strict thread matches above, loose matches on Subject: below --
1999-02-06 0:14 Matthew Lovell
1999-02-05 18:06 Matthew Lovell
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).