From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8512 invoked from network); 3 Jul 2006 18:15:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,HTML_30_40,HTML_MESSAGE autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Jul 2006 18:15:28 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 32097 invoked from network); 3 Jul 2006 18:15:20 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Jul 2006 18:15:20 -0000 Received: (qmail 14514 invoked by alias); 3 Jul 2006 18:15:13 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10469 Received: (qmail 14504 invoked from network); 3 Jul 2006 18:15:13 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Jul 2006 18:15:13 -0000 Received: (qmail 31101 invoked from network); 3 Jul 2006 18:15:13 -0000 Received: from nz-out-0102.google.com (64.233.162.192) by a.mx.sunsite.dk with SMTP; 3 Jul 2006 18:15:12 -0000 Received: by nz-out-0102.google.com with SMTP id i28so938217nzi for ; Mon, 03 Jul 2006 11:15:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=oLoMhMLqLsUvw/baZ8XErl6iSZKKE+A6RXptXYDEaCfdJb15hQq0KTS8XAjYwSBc2afRq1Rh05a/jDHIc5WiHeQ1T3vjcytwW+uQXyGMToJuNpXAnZPJPZNj8nGDwEIW9ZGixLwI8ksM+FI339wn3p5AiGuZgWjXYmjk/mjg1yM= Received: by 10.36.74.20 with SMTP id w20mr3903738nza; Mon, 03 Jul 2006 11:15:04 -0700 (PDT) Received: by 10.37.13.44 with HTTP; Mon, 3 Jul 2006 11:15:04 -0700 (PDT) Message-ID: Date: Mon, 3 Jul 2006 20:15:04 +0200 From: "Alex Polite" To: zsh-users@sunsite.dk Subject: Re: Adding a new-line to the prompt. In-Reply-To: <20060703173129.GV26504@fsst.voodoo.lan> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_14442_14452052.1151950504481" References: <20060703173129.GV26504@fsst.voodoo.lan> ------=_Part_14442_14452052.1151950504481 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 7/3/06, Frank Terbeck wrote: > > > PROMPT=$'line0\nline1\nline2-%~%% ' > > I think $'' quoting is described in zshmisc(1) /QUOTING. > Thanks that hit the spot. Now I have this: fg_green=$'%{\e[0;32m%}' fg_blue=$'%{\e[0;34m%}' fg_cyan=$'%{\e[0;36m%}' fg_red=$'%{\e[0;31m%}' fg_brown=$'%{\e[0;33m%}' fg_purple=$'%{\e[0;35m%}' fg_light_gray=$'%{\e[0;37m%}' fg_dark_gray=$'%{\e[1;30m%}' fg_light_blue=$'%{\e[1;34m%}' fg_light_green=$'%{\e[1;32m%}' fg_light_cyan=$'%{\e[1;36m%}' fg_light_red=$'%{\e[1;31m%}' fg_light_purple=$'%{\e[1;35m%}' fg_no_colour=$'%{\e[0m%}' fg_white=$'%{\e[1;37m%}' fg_black=$'%{\e[0;30m%}' lb="%{$fg_dark_gray%}[%{$fg_no_colour%}" rb="$fg_dark_gray]$fg_no_colour" red_time="$fg_red%T$fg_no_colour" cyan_user="$fg_cyan%n$fg_no_colour" purple_host="$fg_purple%M$fg_no_colour" green_pwd="$fg_green~$fg_no_colour" PROMPT="$lb$red_time$rb$lb$cyan_user$rb$lb$purple_host$rb$lb$green_pwd$rb"$'\n' alias ls='ls --color=auto' alias l='ls' alias ll='ls -l' alias lsd='ls -d' alias lsa='ls -la' alias la='ls -lha' alias lh='ls -lh' alias rm='rm -i' alias cvs='cvs -q -z6' alias ssh='ssh -X -C -c blowfish' alias tat='svn up; svn ci -m"this and that"' And it works fine. -- Alex Polite http://flosspick.org - finding the right open source ------=_Part_14442_14452052.1151950504481 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 7/3/06, Frank Terbeck <frank.terbeck@rwth-aachen.de> wrote:

PROMPT=$'line0\nline1\nline2-%~%% '

I think $'' quoting is described in zshmisc(1) /QUOTING.

Thanks that hit the spot. Now I have this:


fg_green=$'%{\e[0;32m%}'
fg_blue=$'%{\e[0;34m%}'
fg_cyan=$'%{\e[0;36m%}'
fg_red=$'%{\e[0;31m%}'
fg_brown=$'%{\e[0;33m%}'
fg_purple=$'%{\e[0;35m%}'
fg_light_gray=$'%{\e[0;37m%}'
fg_dark_gray=$'%{\e[1;30m%}'
fg_light_blue=$'%{\e[1;34m%}'
fg_light_green=$'%{\e[1;32m%}'
fg_light_cyan=$'%{\e[1;36m%}'
fg_light_red=$'%{\e[1;31m%}'
fg_light_purple=$'%{\e[1;35m%}'
fg_no_colour=$'%{\e[0m%}'

fg_white=$'%{\e[1;37m%}'
fg_black=$'%{\e[0;30m%}'

lb="%{$fg_dark_gray%}[%{$fg_no_colour%}"
rb="$fg_dark_gray]$fg_no_colour"

red_time="$fg_red%T$fg_no_colour"
cyan_user="$fg_cyan%n$fg_no_colour"
purple_host="$fg_purple%M$fg_no_colour"
green_pwd="$fg_green~$fg_no_colour"

PROMPT="$lb$red_time$rb$lb$cyan_user$rb$lb$purple_host$rb$lb$green_pwd$rb"$'\n'

alias ls='ls --color=auto'
alias l='ls'
alias ll='ls -l'
alias lsd='ls -d'
alias lsa='ls -la'
alias la='ls -lha'
alias lh='ls -lh'
alias rm='rm -i'
alias cvs='cvs -q -z6'
alias ssh='ssh -X -C -c blowfish'
alias tat='svn up; svn ci -m"this and that"'



And it works fine.


--
Alex Polite
http://flosspick.org - finding the right open source ------=_Part_14442_14452052.1151950504481--