From owner-freebsd-questions@FreeBSD.ORG Fri May 19 09:47:44 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B88C216A425 for ; Fri, 19 May 2006 09:47:44 +0000 (UTC) (envelope-from kyrreny@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B2B143D60 for ; Fri, 19 May 2006 09:47:42 +0000 (GMT) (envelope-from kyrreny@broadpark.no) Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0IZI0002TB7B7Q80@osl1smout1.broadpark.no> for questions@freebsd.org; Fri, 19 May 2006 11:47:35 +0200 (CEST) Received: from urban.broadpark.no ([80.203.212.30]) by osl1sminn1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0IZI00CZ9B7BBGG0@osl1sminn1.broadpark.no> for questions@freebsd.org; Fri, 19 May 2006 11:47:35 +0200 (CEST) Date: Fri, 19 May 2006 11:47:38 +0200 From: Kyrre Nygard In-reply-to: <20060518204826.GB61792@dan.emsphone.com> To: Dan Nelson Message-id: <7.0.1.0.2.20060519114621.0225f010@broadpark.no> MIME-version: 1.0 X-Mailer: QUALCOMM Windows Eudora Version 7.0.1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT References: <7.0.1.0.2.20060516102254.021e2b50@broadpark.no> <20060516163920.GB9679@holestein.holy.cow> <7.0.1.0.2.20060517112311.021f9220@broadpark.no> <20060517150438.GA96480@dan.emsphone.com> <7.0.1.0.2.20060518105022.022051b8@broadpark.no> <20060518150254.GA61792@dan.emsphone.com> <7.0.1.0.2.20060518192702.022713f0@broadpark.no> <20060518204826.GB61792@dan.emsphone.com> Cc: questions@freebsd.org, Parv Subject: Re: Converting a zsh prompt to bash X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2006 09:47:45 -0000 At 22:48 18.05.2006, Dan Nelson wrote: >Mine's strictly functional. User, host, path in left prompt; error >status in right prompt. Within screen, I add the window number to the >left prompt and the date&time to the right prompt so I know how long >I've left a window idle. > >if [[ $+WINDOW = 1 && $TERM = screen* ]] ; then > PROMPT="(%n@%m.$WINDOW) %B%/>%(#/#/)%b " > RPROMPT="%(?.. %B%?%b)%t %D{%m/%d}" >else > PROMPT="(%n@%m) %B%/>%(#/#/)%b " > RPROMPT="%(?..%?)" >fi > >-- > Dan Nelson > dnelson@allantgroup.com This is what I'm now going to settle with. The screen function was really wicked. I've always felt lost while I'm messing about my screens. If you have any advice, please make them regarding this setup: if [[ `whoami` = root ]] then a1="%{$fg_bold[red]%}" a2="%{$fg_no_bold[red]%}" else a1="%{$fg_bold[cyan]%}" a2="%{$fg_no_bold[cyan]%}" fi PROMPT="$a1(%n@%m)$a2(%D{%d/%m}+%D{%H:%M})"$'\n' PROMPT+="$a2(%~) %{$reset_color%}" if [[ $+WINDOW = 1 && $TERM = screen* ]] then PROMPT="$a1(%n@%m)$a2($WINDOW)(%D{%d/%m}+%D{%H:%M})"$'\n' PROMPT+="$a2(%~) %{$reset_color%}" fi Thanks :) Kyrre