From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27566 invoked from network); 9 May 2005 02:35:35 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 May 2005 02:35:35 -0000 Received: (qmail 67080 invoked from network); 9 May 2005 02:35:28 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 May 2005 02:35:28 -0000 Received: (qmail 27297 invoked by alias); 9 May 2005 02:35:21 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8793 Received: (qmail 27273 invoked from network); 9 May 2005 02:35:20 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 May 2005 02:35:20 -0000 Received: (qmail 66133 invoked from network); 9 May 2005 02:35:20 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 9 May 2005 02:35:15 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IG700265B6O7TD6@vms044.mailsrvcs.net> for zsh-users@sunsite.dk; Sun, 08 May 2005 21:35:14 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j492ZBbe009686 for ; Sun, 08 May 2005 19:35:11 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j492ZBv2009685 for zsh-users@sunsite.dk; Sun, 08 May 2005 19:35:11 -0700 Date: Mon, 09 May 2005 02:35:10 +0000 From: Bart Schaefer Subject: Re: Help help, prompt problems here! In-reply-to: <20050508193722.8F67C1CE303@ws1-6.us4.outblaze.com> To: zsh-users@sunsite.dk Message-id: <1050509023510.ZM9684@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <20050508193722.8F67C1CE303@ws1-6.us4.outblaze.com> Comments: In reply to "Fafa Hafiz Krantz" "Help help, prompt problems here!" (May 8, 2:37pm) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On May 8, 2:37pm, Fafa Hafiz Krantz wrote: } } I am having some difficulty on one of the two boxes I installed } zsh on today. The box having problems won't let no prompt appear } unless I type CTRL+C. Even after I do that, it's not the prompt } I've specified in /etc/zshrc. As a general principle, you should be very careful of what you put into the /etc/z* files, as opposed the $HOME/.z* files of each user. For example: } prompt elite2 green } } if [[ `whoami` = root ]] then } prompt elite2 red } fi This would be much better handled by placing "prompt elite2 red" in ~root/.zshrc and "prompt elite2 green" in ~fteg/.zshrc (or whatever your non-root user account is, if it's not "fteg"). However, if you must test for root in /etc/z*, the best way is simply to check with [[ $EUID = 0 ]] or even (( EUID == 0 )). Returning to the original problem -- it seems likely that either (a) there's something in /etc/zshenv that you're not telling us about, and that something is stuck, possibly waiting for input, until you hit the ctrl+c, or (b) `whoam` itself is stuck for some reason, and when you hit ctrl+c it fails, so the "if" fails, so "prompt elite2 red" is not executed. You could find out which of these things is happening by placing a "set -x" at the top of /etc/zshenv, or by running "zsh -x". } Also, I need help modifying the theme 'elite2' into looking just } a little bit better. Find the prompt_elite2_setup file with this: print ${^fpath}/prompt_elite2_setup(N) Copy that file to a new name in some directory in $fpath (it does not have to be the same directory), such as prompt_fteg_setup -- the string between the underscores is the theme name, so this is creating a new theme named "fteg". Edit prompt_fteg_setup and globally search-and-replace to change all occurrences of "elite2" to "fteg". Then find the assignment to PS1, right in the middle of the prompt_fteg_setup function, and remove the substring $parens($text%!$punctuation_color/$text%y$parens)$text That'll leave you with two consective meta+d (0xc4) characters, of which you should delete one. I think it was bad form of the elite2 author to leave raw non-ascii characters there, but the entire "for code in ..." loop is extraneous as well ... it appears just to be sloppy or incomplete copying from prompt_elite_setup. Anyway, in that same long ugly assignment, the time is displayed with %D{%I:%M%P} and the date with %D{%m/%d/%y} you need to edit the stuff inside the { } to change the format. See "man strftime" for details. Having finished with those edits and saved the file so that it's in a directory in $fpath the next time zsh starts up, you should be able to change "prompt elite2 green" to "prompt fteg green".