zsh-workers
 help / color / mirror / code / Atom feed
* zsh-newuser-install running before global "source" files
@ 2022-08-15 19:56 Abhishek Banerji
  2022-08-16  7:03 ` Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Abhishek Banerji @ 2022-08-15 19:56 UTC (permalink / raw)
  To: zsh-workers

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

Hi,
I noticed that no matter where I set ZDOTDIR env variable,
zsh-newuser-install will always look for $HOME/.z* files and shows the new
user message and prompt. But I can press 'q' and it will then source
$ZDOTDIR files and everything works from there. but every new shell (via
ssh) or terminal i open the new user prompt shows up.

I have set ZDOTDIR env variable in the following files and in
zsh-newuser-install the variable is not set.

ones i had to create
/etc/zprofile
/etc/zshenv
/etc/zshrc

this one was already present
/etc/zsh/zprofile

DISTRO: Archlinux

[-- Attachment #2: Type: text/html, Size: 757 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: zsh-newuser-install running before global "source" files
  2022-08-15 19:56 zsh-newuser-install running before global "source" files Abhishek Banerji
@ 2022-08-16  7:03 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2022-08-16  7:03 UTC (permalink / raw)
  To: Abhishek Banerji, zsh-workers

Abhishek Banerji wrote on Mon, 15 Aug 2022 19:56 +00:00:
> Hi,
> I noticed that no matter where I set ZDOTDIR env variable,
> zsh-newuser-install will always look for $HOME/.z* files and shows the new
> user message and prompt. But I can press 'q' and it will then source
> $ZDOTDIR files and everything works from there. but every new shell (via
> ssh) or terminal i open the new user prompt shows up.
>
> I have set ZDOTDIR env variable in the following files and in
> zsh-newuser-install the variable is not set.
>
> ones i had to create
> /etc/zprofile
> /etc/zshenv
> /etc/zshrc
>
> this one was already present
> /etc/zsh/zprofile
>
> DISTRO: Archlinux

zsh-newuser-install has been looking for $ZDOTDIR before $HOME
since 2005 at least.

Chances are the global zshenv file isn't called /etc/zshenv in your
build.  Check that . «strings =zsh | grep zshenv» or «strace -e file zsh
-fc : 2>&1 | grep zshenv» should find it.

Setting $ZDOTDIR in the global zprofile or zshrc isn't expected to work
as these are sourced _after_ zsh-newuser-install is run.  [Citation:
Src/init.c:run_init_scripts().]

Cheers,

Daniel
(who suspects there's an easier answer that he's overlooking)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-16  7:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-15 19:56 zsh-newuser-install running before global "source" files Abhishek Banerji
2022-08-16  7:03 ` Daniel Shahaf

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).