From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23861 invoked from network); 24 Nov 2004 05:02:28 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 24 Nov 2004 05:02:28 -0000 Received: (qmail 40892 invoked from network); 24 Nov 2004 05:02:20 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 24 Nov 2004 05:02:20 -0000 Received: (qmail 19908 invoked by alias); 24 Nov 2004 05:02:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20578 Received: (qmail 19894 invoked from network); 24 Nov 2004 05:02:02 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 24 Nov 2004 05:02:02 -0000 Received: (qmail 40492 invoked from network); 24 Nov 2004 05:01:18 -0000 Received: from acolyte.scowler.net (216.254.112.45) by a.mx.sunsite.dk with SMTP; 24 Nov 2004 05:01:17 -0000 Received: by acolyte.scowler.net (Postfix, from userid 1000) id B73117004F; Wed, 24 Nov 2004 00:01:13 -0500 (EST) Date: Wed, 24 Nov 2004 00:01:13 -0500 From: Clint Adams To: zsh-workers@sunsite.dk Cc: 266785-forwarded@bugs.debian.org, 266785-submitter@bugs.debian.org Subject: [jjminar@fastmail.fm: Bug#266785: zsh: The elite2 prompt displays the tty incorrectly] Message-ID: <20041124050113.GA17679@scowler.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.6+20040722i X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 I'm gonna commit this instead, as I don't have a position on the "/" to "|" change. Index: Functions/Prompts/prompt_elite2_setup =================================================================== RCS file: /cvsroot/zsh/zsh/Functions/Prompts/prompt_elite2_setup,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 prompt_elite2_setup --- Functions/Prompts/prompt_elite2_setup 18 Nov 1999 15:15:27 -0000 1.1.1.3 +++ Functions/Prompts/prompt_elite2_setup 24 Nov 2004 04:55:33 -0000 @@ -25,13 +25,12 @@ : ${(P)varname=$(echo -n "\\0$code")} done - local tty=`tty|cut -d/ -f3` local text="%{$fg_no_bold[$text_col]%}" local parens="%{$fg_bold[$parens_col]%}" local punctuation_color="%{$fg_bold[grey]%}" local reset="%{$reset_color%}" - PS1="$punctuation_colorÚ$textÄ$parens($text%n$punctuation_color@$text%m$parens)$textÄ$parens($text%!$punctuation_color/$text$tty$parens)$textÄ$parens($text%D{%I:%M%P}$punctuation_color:$text%D{%m/%d/%y}$parens)$textÄ$punctuation_color-$reset$prompt_newline$punctuation_colorÀ$textÄ$parens($text%#$punctuation_color:$text%~$parens)$textÄ$punctuation_color-$reset " + PS1="$punctuation_colorÚ$textÄ$parens($text%n$punctuation_color@$text%m$parens)$textÄ$parens($text%!$punctuation_color/$text%y$parens)$textÄ$parens($text%D{%I:%M%P}$punctuation_color:$text%D{%m/%d/%y}$parens)$textÄ$punctuation_color-$reset$prompt_newline$punctuation_colorÀ$textÄ$parens($text%#$punctuation_color:$text%~$parens)$textÄ$punctuation_color-$reset " PS2="$parensÄ$textÄ$punctuation_color-$reset " ----- Forwarded message from Jan Minar ----- Date: Thu, 19 Aug 2004 07:32:37 +0200 From: Jan Minar To: Debian Bug Tracking System Subject: Bug#266785: zsh: The elite2 prompt displays the tty incorrectly Package: zsh Version: 4.0.4-33 Severity: minor Tags: patch The elite2 prompt is incorrect -- the tty bit is OK for /dev/*, but it fails with /dev/*/* (devpts, i.e. all X terminals a.o.). I see no difference between using cut(1) and %y. I also changed the delimiter, so it plays more nicely with the fact the dashes are now part of the tty name. The incorrect prompt: (jan@kontryhel)(31337/pts)(05:15am:08/19/04)- ^^^ The guilty line: local tty=`tty|cut -d/ -f3` ^^^ should read -f3- The corrected prompt: (jan@kontryhel)(31337|pts/1)(05:15am:08/19/04)- ^ ^^ The patch: --- /usr/share/zsh/4.0.4/functions/Prompts/prompt_elite2_setup.ORIG Sat Jun 12 02:35:53 2004 +++ /usr/share/zsh/4.0.4/functions/Prompts/prompt_elite2_setup Sat Jun 12 02:38:52 2004 @@ -25,13 +25,13 @@ : ${(P)varname=$(echo -n "\\0$code")} done - local tty=`tty|cut -d/ -f3` + local tty=%y local text="%{$fg_no_bold[$text_col]%}" local parens="%{$fg_bold[$parens_col]%}" local punctuation_color="%{$fg_bold[grey]%}" local reset="%{$reset_color%}" - PS1="$punctuation_colorÚ$textÄ$parens($text%n$punctuation_color@$text%m$parens)$textÄ$parens($text%!$punctuation_color/$text$tty$parens)$textÄ$parens($text%D{%I:%M%P}$punctuation_color:$text%D{%m/%d/%y}$parens)$textÄ$punctuation_color-$reset$prompt_newline$punctuation_colorŔ$textÄ$parens($text%#$punctuation_color:$text%~$parens)$textÄ$punctuation_color-$reset " + PS1="$punctuation_colorÚ$textÄ$parens($text%n$punctuation_color@$text%m$parens)$textÄ$parens($text%!$punctuation_color|$text$tty$parens)$textÄ$parens($text%D{%I:%M%P}$punctuation_color:$text%D{%m/%d/%y}$parens)$textÄ$punctuation_color-$reset$prompt_newline$punctuation_colorŔ$textÄ$parens($text%#$punctuation_color:$text%~$parens)$textÄ$punctuation_color-$reset " PS2="$parensÄ$textÄ$punctuation_color-$reset " Cheers, Jan. -- System Information Debian Release: 3.0 Architecture: i386 Kernel: Linux kontryhel 2.4.27-jan #2 Tue Aug 17 11:10:35 CEST 2004 i686 Locale: LANG=C, LC_CTYPE=cs_CZ.ISO-8859-2 Versions of packages zsh depends on: ii libc6 2.2.5-11.5 GNU C Library: Shared libraries an ii libcap1 1:1.10-12 support for getting/setting POSIX. ii libncurses5 5.2.20020112a-7 Shared libraries for terminal hand -- "To me, clowns aren't funny. In fact, they're kind of scary. I've wondered where this started and I think it goes back to the time I went to the circus, and a clown killed my dad." ----- End forwarded message -----