Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Zsh question
- X-seq: zsh-users 1427
- From: Andrew Main <zefram@xxxxxxxxx>
- To: fysh@xxxxxxxx
- Subject: Re: Zsh question
- Date: Wed, 25 Mar 1998 17:27:29 +0000 (GMT)
- In-reply-to: <Pine.GSO.3.96.980325155059.26447D-100000@flivoreuse> from "Giles Constant" at Mar 25, 98 04:42:57 pm
(Bcced to zsh-users because of possible interest there. zsh-users
readers, make sure you don't accidentally reply to fysh@xxxxxxxxx)
Giles Constant wrote:
>[pts/2] :) ~/doc [flivoreuse]
>
>Benbar came up with the amusing idea of making the smiley prompt change
>randomly every time I hit return (or even change to something that
>reflects the load of the machine).
Cool idea.
PS1='[%l] %1v '
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]=':-{' ;;
[67].*) psvar[1]=':-(' ;;
*) psvar[1]='|-O' ;;
esac
}
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author