From: lists <lists@kalama.no-ip.org>
To: zsh-users@sunsite.dk
Subject: Resolved: Sourcing .zshrc from .zprofile causes problems
Date: Sat, 14 Aug 2004 10:31:08 -0500 [thread overview]
Message-ID: <F692BDE6-EE06-11D8-BE5C-000A95D2C79E@kalama.no-ip.org> (raw)
In-Reply-To: <Pine.LNX.4.61.0408122151280.15905@toltec.zanshin.com>
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 ?
next prev parent reply other threads:[~2004-08-14 15:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-13 1:02 lists
2004-08-13 5:11 ` Bart Schaefer
2004-08-13 6:55 ` Philippe Troin
2004-08-14 15:31 ` lists [this message]
2004-08-14 18:20 ` Resolved: " Vincent Lefevre
2004-08-15 4:58 ` Wayne Davison
2004-08-15 13:54 ` Vincent Lefevre
2004-08-15 18:38 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F692BDE6-EE06-11D8-BE5C-000A95D2C79E@kalama.no-ip.org \
--to=lists@kalama.no-ip.org \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).