From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6861 invoked from network); 24 May 2007 17:12:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=no version=3.2.0 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 May 2007 17:12:05 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 21271 invoked from network); 24 May 2007 17:11:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 May 2007 17:11:58 -0000 Received: (qmail 10249 invoked by alias); 24 May 2007 17:11:49 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11507 Received: (qmail 10239 invoked from network); 24 May 2007 17:11:48 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 May 2007 17:11:48 -0000 Received: (qmail 20036 invoked from network); 24 May 2007 17:11:48 -0000 Received: from an-out-0708.google.com (209.85.132.250) by a.mx.sunsite.dk with SMTP; 24 May 2007 17:11:45 -0000 Received: by an-out-0708.google.com with SMTP id c14so97066anc for ; Thu, 24 May 2007 10:11:42 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Cqrw0j55xiwVuKFV5m3ks6lZov1GgMaXXcHfkrJJkaA/+NrQfoh7wbN0TdKmY/gFwyN/Lx6zXQJop1shysyq6WXv4NBJ3Ev0Y98b1JZcomQ3kM9AmiS09XKyenF44bZsav0PgiNQWW3opKvJAGL3rH9P7p3yUAMAucEmB5lW6jg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jpiwPDzciOoNPwfAgcIWUbGt27uxFbGIVoYSg09qqrOC9fxUEtbSPdNuam8kfBSmYMRIIxlXshtGF6qyfIwGhQLTYd2dR5VoFrDsqh3jugLHpq0evpZSAeZQM7qZ55YuSqOC5xphk8XQnXOa+rHD4imop5DiHeuXSCFet3eYNfI= Received: by 10.142.89.9 with SMTP id m9mr40638wfb.1180026702519; Thu, 24 May 2007 10:11:42 -0700 (PDT) Received: by 10.143.4.4 with HTTP; Thu, 24 May 2007 10:11:42 -0700 (PDT) Message-ID: <237967ef0705241011k61e67d42ic905efa86e7179f1@mail.gmail.com> Date: Thu, 24 May 2007 19:11:42 +0200 From: "Mikael Magnusson" To: fREW Subject: Re: If then Prompt Cc: "Zsh users list" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <237967ef0705240918w6a923e7fk9e7f28164037715e@mail.gmail.com> On 24/05/07, fREW wrote: > On 5/24/07, Mikael Magnusson wrote: > > On 24/05/07, fREW wrote: > > > Hey all, > > > > > > I was thinking that it would be cool to show the number of jobs if > > > there were more than 0 jobs. I know you can do this with things like > > > the return value, is there any way to do it with jobs? > > > > Sure, > > PS1=$'%(1j.%j jobs .)' > > > > -- > > Mikael Magnusson > > > > Awesome! Thanks! If anyone cares or wants to see it, here is my > current prompt. [...] > if [[ $TERM == linux ]]; then > else > precmd () { print -Pn "\e]0;%m: %~\a" } > fi > > > It doesn't show the username, because it usually doesn't matter to me > what user I am logged into (it's just a user or root) so I don't show > that. Also the last part which will put the current directory in the > title of an xterm doesn't work if you are in a screen session. if [[ $TERM == screen]; then function precmd() { print -Pn "\033]0;S $TTY:t{%100<...<%~%<<}\007" } elsif etc personally i use a case $TERM in ... screen) ... *) ... construct -- Mikael Magnusson