From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 5 Feb 1999 17:36:55 -0600 (CST) From: Shawn Leas To: Matthew Lovell Cc: Zsh Users List Subject: Re: PWD in prompt Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Mailing-List: 2107 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. <============================================>