zsh-workers
 help / color / mirror / code / Atom feed
From: "Guðmundur Páll Kjartansson" <gpk188@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: Possibly a bug involving rcs flag on mac?
Date: Wed, 20 Feb 2019 13:48:52 +0000	[thread overview]
Message-ID: <CAAaMBvCOduVpOGYZkWkQydC7Wrw7JUAz+DpnGJnR9nGUEVGgWw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7YGXzSwBAY1OCJHgVLZ7Yvo0Q-GBOckpJD_-FG+NXGKqA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]

>
> 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@brasslantern.com>
wrote:

> On Tue, Feb 19, 2019, 3:05 PM Guðmundur Páll Kjartansson <gpk188@gmail.com
> 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.
>

      reply	other threads:[~2019-02-20 13:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 23:04 Guðmundur Páll Kjartansson
2019-02-20  2:06 ` Eric Cook
2019-02-20  5:11 ` Bart Schaefer
2019-02-20 13:48   ` Guðmundur Páll Kjartansson [this message]

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=CAAaMBvCOduVpOGYZkWkQydC7Wrw7JUAz+DpnGJnR9nGUEVGgWw@mail.gmail.com \
    --to=gpk188@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).