From: Andrew Main <zefram@tao.co.uk>
To: fysh@fysh.org
Subject: Re: Zsh question
Date: Wed, 25 Mar 1998 17:27:29 +0000 (GMT) [thread overview]
Message-ID: <199803251727.RAA05268@taos.demon.co.uk> (raw)
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@fysh.org.)
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
next parent reply other threads:[~1998-03-25 17:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.GSO.3.96.980325155059.26447D-100000@flivoreuse>
1998-03-25 17:27 ` Andrew Main [this message]
1998-03-26 11:58 ` Zsh question (more smileys in the prompt) C. v. Stuckrad
1998-03-26 18:40 ` Andrew Main
1998-03-26 21:25 ` Funky zsh prompts Adam Spiers
1998-03-26 22:11 ` Mike Smith
1998-03-31 18:27 ` Sven Guckes
1997-06-08 7:35 zsh question Brian Harvell
1997-06-08 11:51 ` Zefram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199803251727.RAA05268@taos.demon.co.uk \
--to=zefram@tao.co.uk \
--cc=fysh@fysh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).