From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20044 invoked from network); 25 Mar 1998 17:38:03 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (7795@203.24.36.3) by ns1.primenet.com.au with SMTP; 25 Mar 1998 17:38:03 -0000 Received: (qmail 3347 invoked from network); 25 Mar 1998 17:38:02 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns2.primenet.com.au with SMTP; 25 Mar 1998 17:38:02 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id MAA23097; Wed, 25 Mar 1998 12:28:25 -0500 (EST) Resent-Date: Wed, 25 Mar 1998 12:28:11 -0500 (EST) From: Andrew Main Message-Id: <199803251727.RAA05268@taos.demon.co.uk> Subject: Re: Zsh question To: fysh@fysh.org Date: Wed, 25 Mar 1998 17:27:29 +0000 (GMT) In-Reply-To: from "Giles Constant" at Mar 25, 98 04:42:57 pm X-Loop: zefram@tao.co.uk X-Headers: in preparation X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"dWTkC1.0.Re5.gwJ6r"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1427 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu (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