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

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

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.

  parent reply	other threads:[~2019-02-20  5:12 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 [this message]
2019-02-20 13:48   ` Guðmundur Páll Kjartansson

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='CAH+w=7YGXzSwBAY1OCJHgVLZ7Yvo0Q-GBOckpJD_-FG+NXGKqA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=gpk188@gmail.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).