Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PWD in prompt
- X-seq: zsh-users 2107
- From: Shawn Leas <sleas@xxxxxxxxxxxxxxxxxxx>
- To: Matthew Lovell <lovell@xxxxxxxxx>
- Subject: Re: PWD in prompt
- Date: Fri, 5 Feb 1999 17:36:55 -0600 (CST)
- Cc: Zsh Users List <zsh-users@xxxxxxxxxxxxxxx>
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.
<============================================>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author