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

Re: Coolest prompt?



Mine currently says

91.0 F Aaron-Davies-Computer~ :) %

the relevant zprofile line is

export PS1='`cat /tmp/temperature`'" %m%~ %(0?.:).:() %# "

but the real magic is in my crontab:

*/15 * * * * curl -s http://weather.noaa.gov/weather/current/KSDF.html | grep 'F (' | head -n 1 | awk '{print $3 " " $4}' > /tmp/temperature

I got both "cute" ideas (the temp and the return-code smilies) from Slashdot discussions on prompt strings.

On Friday, June 11, 2004, at 06:29 AM, Ziggy wrote:

ZSH allows the user to create interesting prompts. Time displaying, menu bars
and colors.

Post your prompt (and .zshrc) here.

Mine is a rather simple one:
adi@omega ~ % 1:27PM Fri

My zshrc::

alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -lh"
alias nano="nano -w"
alias "nano --override"="nano"
alias BitchX="BitchX dushkinup"
      autoload -U compinit promptinit
      compinit
      promptinit; prompt gentoo

RPROMPT=' %B%@%b %U%D{%a}%u'
prompt="{%U%n#%l@%m:%h%u} %30<...<%~%#"

chpwd() {
   [[ -t 1 ]] || return
   if [[ -n $xterm_prompt ]] {
       print -Pn "\e]2;${USER}@${HOST}:%~\a"
   }
}

--
Linux
2.6.6
(Gentoo)
i686 P4


Men occasionally stumble over the truth, but most of them pick themselves
up and hurry off as if nothing had happened.
		-- Winston Churchill


--
    __                      __
   /  )                    /  )
  /--/ __.  __  ______    /  / __. , __o  _  _
 /  (_(_/|_/ (_(_) / (_  /__/_(_/|_\/ <__</_/_)_



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