Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Possibly a bug involving rcs flag on mac?
- X-seq: zsh-workers 44074
- From: Guðmundur Páll Kjartansson <gpk188@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Possibly a bug involving rcs flag on mac?
- Date: Wed, 20 Feb 2019 13:48:52 +0000
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MpUMbdkN1hsne83yxz3ZRylxhFtD70UbEazKsjJo6po=; b=CibAqz7kG0ES9fo6jYHK6iFlF61WJRGs6CrTv4Q8z1K4dTVacU81QTN8u5EvXMufhc pnNGPfRxjAXDgV4DY8go5R706DPNzPi/PwwjR7DKnPioHRS3NjfNPFqP78JKM2VQ/woz ciVr+l1vApWQrt/YYNX9FbQVVzSZvarjV70Qu9SeFIy+VCIN1MQZQPt6u0dQvdj5znAP EiZ+soJO5o7t6Xe0ZiSQaOczn/fvFOfEO/EKxZ+GLd4vH1E1fgm4mJFDccVawj35ocZY NAW1VSJnvB+ajlJpNq/U+IMISm44PrKmeyPp0OxILZ1bn29a8hqdt41bMHVOn+JDDyr6 ujGg==
- In-reply-to: <CAH+w=7YGXzSwBAY1OCJHgVLZ7Yvo0Q-GBOckpJD_-FG+NXGKqA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAAaMBvDV-bYMkf6E41gsSs1GwoUgQ8KwGxVKyycG0FURv7fKvg@mail.gmail.com> <CAH+w=7YGXzSwBAY1OCJHgVLZ7Yvo0Q-GBOckpJD_-FG+NXGKqA@mail.gmail.com>
>
> I'm not sure what to say about that; is it possible that $HOME is set
> incorrectly or that $ZDOTDIR is set?
This was my problem ... I had completely forgotten about $ZDOTDIR. I just
found out that in one case the shell was running ~/.zshrc and in the other
case $ZDOTDIR/.zshrc
I managed to fix that issue by letting one of those files source the other.
> You have misunderstood how the shell options work.
Yes ... I mistakenly thought that --rcs worked the same way as --rcfile in
bash
Thank you for your help!
On Wed, Feb 20, 2019 at 5:11 AM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
wrote:
> On Tue, Feb 19, 2019, 3:05 PM Guðmundur Páll Kjartansson <gpk188@xxxxxxxxx
> wrote:
>
>> Greetings
>>
>> I have some strange buggy behaviour going on. If I run zsh in a bash
>> terminal window, it will not run .zshrc:
>>
>> $ zsh
>>
>
> I'm not sure what to say about that; is it possible that $HOME is set
> incorrectly or that $ZDOTDIR is set? Does zsh appear otherwise to be
> interactive, i.e., it prints prompts and ZLE is working?
>
> If I instead do this:
>>
>> $ zsh --rcs ~/.zshrc
>>
>> Then it will run .zshrc ... but it will also exit immediately
>
>
> You have misunderstood how the shell options work. If you give the shell
> a file name as an argument, it reads that file for commands and then
> exits. The --rcs option does not change that, it merely says that it's OK
> for the shell to read the usual startup files as well (where "usual"
> depends on whether the shell is interactive, is a login shell, etc.).
>
> --rcs is the default, so ordinarily one would be using --norcs to turn
> them off instead.
>
> ... this
>> happens even if I run it in interactive mode:
>>
>> $ zsh --interactive ~/.zshrc
>>
>
> Yes, even if the shell is interactive a filename argument means to read
> the file and exit.
>
> To force the shell NOT to read commands from the argument file, you must
> use the --shinstdin option. There is no simple way to cause the shell to
> first read a file and then continue reading from stdin / the terminal.
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author