From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22527 invoked from network); 14 Aug 2004 15:38:11 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Aug 2004 15:38:11 -0000 Received: (qmail 71576 invoked from network); 14 Aug 2004 15:38:05 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Aug 2004 15:38:05 -0000 Received: (qmail 12330 invoked by alias); 14 Aug 2004 15:37:21 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7842 Received: (qmail 12320 invoked from network); 14 Aug 2004 15:37:21 -0000 Received: from unknown (HELO a.mx.sunsite.dk) (130.225.247.88) by 130.225.247.90 with SMTP; 14 Aug 2004 15:37:21 -0000 Received: (qmail 69720 invoked from network); 14 Aug 2004 15:35:23 -0000 Received: from ms-smtp-01.texas.rr.com (HELO ms-smtp-01-eri0.texas.rr.com) (24.93.47.40) by a.mx.sunsite.dk with SMTP; 14 Aug 2004 15:35:22 -0000 Received: from amdxp.kalama.no-ip.org (cs666888-186.austin.rr.com [66.68.88.186]) by ms-smtp-01-eri0.texas.rr.com (8.12.10/8.12.7) with ESMTP id i7EFZJQ1015703 for ; Sat, 14 Aug 2004 10:35:19 -0500 (CDT) Received: from [10.0.1.99] (unknown [10.0.1.99]) by amdxp.kalama.no-ip.org (Postfix) with ESMTP id A3A961FC; Sat, 14 Aug 2004 10:35:18 -0500 (CDT) In-Reply-To: References: <7E0A2482-ECC4-11D8-A541-000A95D2C79E@kalama.no-ip.org> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: lists Subject: Resolved: Sourcing .zshrc from .zprofile causes problems Date: Sat, 14 Aug 2004 10:31:08 -0500 To: zsh-users@sunsite.dk X-Mailer: Apple Mail (2.619) X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.6 required=6.0 tests=BAYES_10,RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 0.6 I figured it out. It was because I had zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} before export LS_COLORS='di=36:fi=0:ln=35:pi=93:so=32:bd=34;46:cd=34;103:or=31:mi=0: ex=31' in my .zshrc file. Silly me. I know this is a bit off topic, but is the 'export' necessary/correct in the LS_COLORS definition? Thanks, Ryan On Aug 13, 2004, at 12:11 AM, Bart Schaefer wrote: > On Thu, 12 Aug 2004, lists wrote: > >> if [[ -f ~/.zshrc ]]; then . ~/.zshrc ; fi >> >> in my .zprofile > > That shouldn't be necessary. The ~/.zshrc is read by all interactive > shells, and the ~/.zprofile by all login shells. Although it's > possible > to create a non-interactive login shell, it's rather unlikely. > > So the problem here ... > >> .zshrc:unalias:181: no such hash table element: run-help > > ... is that the ~/.zshrc is read _twice_, once when you source it and > then > again when zsh normally would read it, and the second time run-help has > already been unaliased. > >> The error message goes away when in don't source .zshrc in my >> .zprofile. > > Yep. > >> However, at that point the following zstyle from my .zshrc file >> >> zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} >> >> doesn't work > > There must be some kind of order-dependency involved. The normal > sequence > of file reads (where you fail to see colored listings) would be > (ignoring > zshenv and zlogin for now) > /etc/zprofile > ~/.zprofile > /etc/zshrc > ~/.zshrc > > To make colored listings work, you've changed the order to > /etc/zprofile > ~/.zprofile + ~/.zshrc > /etc/zshrc > ~/.zshrc > > When you "exec zsh" chances are it's no longer a login shell, so the > two > zprofile files are not sourced in that case ... since coloring works > then, > that would tend to indicate that something in the ~/.zprofile is > causing > the problem, and it would have to be something that comes after the > point > where you inserted the sourcing of ~/.zshrc. > > Does ~/.zprofile perhaps change the value of $LS_COLORS ?