zsh-users
 help / color / mirror / code / Atom feed
* Why isn't zsh sourcing .zshenv ?
@ 2015-11-14 19:34 TJ Luoma
  2015-11-14 22:31 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: TJ Luoma @ 2015-11-14 19:34 UTC (permalink / raw)
  To: Zsh-Users List


Just recently zsh (5.0.8) on my Mac is doing something weird.

This is most obvious because my $PROMPT is, well, like this:

http://images.luo.ma/skitch/zsh_not_sourcing_zshenv-20151114-142607.jpg

It appears that zsh is not sourcing my .zshenv. None of my aliases, etc 
are being added.

I have tested this in iTerm.app and Terminal.app and it does the same 
thing for both.

If I manually do 'source .zshenv' then everything is fine.

Now, my .zshenv is actually a link:

	lrwxr-xr-x  1 luomat  staff  22 Jul 10 17:36 .zshenv -> 
dotfiles/zsh/zshenv.sh

but that has been true for a long time, and zsh hasn't had a problem 
with it before.

Any help appreciated.

TjL


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

* Re: Why isn't zsh sourcing .zshenv ?
  2015-11-14 19:34 Why isn't zsh sourcing .zshenv ? TJ Luoma
@ 2015-11-14 22:31 ` Bart Schaefer
  2015-11-18 23:38   ` TJ Luoma
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2015-11-14 22:31 UTC (permalink / raw)
  To: TJ Luoma, Zsh-Users List

On Nov 14,  2:34pm, TJ Luoma wrote:
}
} Any help appreciated.

It would appear that some of your dot-files are being read or your
prompt would not have all that unexpanded promptsubst fodder in it.

Does this also affect a new shell started after iTerm is open?  If
so, run as "zsh -x 2>zsh-err.txt" and then examine that file to
determine where things may be going wrong.

Is there anything in /etc/zshenv ?  Other than zsh being invoked
with the -f option, that file is the only place where sourcing of
~/.zshenv can be shut off.


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

* Re: Why isn't zsh sourcing .zshenv ?
  2015-11-14 22:31 ` Bart Schaefer
@ 2015-11-18 23:38   ` TJ Luoma
  2015-11-19  0:28     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: TJ Luoma @ 2015-11-18 23:38 UTC (permalink / raw)
  To: Zsh-Users List



On 14 Nov 2015, at 17:31, Bart Schaefer wrote:

> On Nov 14,  2:34pm, TJ Luoma wrote:
> }
> } Any help appreciated.
>
> It would appear that some of your dot-files are being read or your
> prompt would not have all that unexpanded promptsubst fodder in it.

That seems logical, right? But here's the weird thing:

$ echo;ls -l ~/.zs*;echo

zsh: no matches found: /Users/luomat/.zs*


No .zsh* files at all… except that the unexpanded PROMPT keeps showing 
up.

>
> Does this also affect a new shell started after iTerm is open?  If
> so, run as "zsh -x 2>zsh-err.txt" and then examine that file to
> determine where things may be going wrong.

+/etc/zshenv:1> [ -x /usr/libexec/path_helper ']'
+/etc/zshenv:2> /usr/libexec/path_helper -s
+/etc/zshenv:2> eval 
'PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin";' 
export 'PATH;'
+(eval):1> 
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/Server.app/Contents/ServerRoot/usr/bin:/Applications/Server.app/Contents/ServerRoot/usr/sbin
+(eval):1> export PATH
+/etc/zshrc:2> [ Apple_Terminal '=' Apple_Terminal ']'
+/etc/zshrc:3> setopt combiningchars



> Is there anything in /etc/zshenv ?  Other than zsh being invoked
> with the -f option, that file is the only place where sourcing of
> ~/.zshenv can be shut off.

$ cat /etc/zshenv
if [ -x /usr/libexec/path_helper ]; then
	eval `/usr/libexec/path_helper -s`
fi


$  cat /etc/zshrc
# Correctly display UTF-8 with combining characters.
if [ "$TERM_PROGRAM" = "Apple_Terminal" ]; then
	setopt combiningchars
fi

Here's another weird thing:

$ echo $ZDOTDIR
/Users/luomat/dotfiles/zsh

HOW IS THAT GETTING SET?!

It seems like there is some sort of phantom process hanging around 
keeping my .zsh* in memory.

Maybe I'll try rebooting

{Reboots}

OK, _now_ I am seeing an empty prompt and no ZDOTDIR set.


{moves ~/.zshenv back into place and Reboots again}

OK, now everything is working fine. No un-expanded prompt.

What… The… Heck?

Gremlins?






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

* Re: Why isn't zsh sourcing .zshenv ?
  2015-11-18 23:38   ` TJ Luoma
@ 2015-11-19  0:28     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2015-11-19  0:28 UTC (permalink / raw)
  To: Zsh-Users List

On Nov 18,  6:38pm, TJ Luoma wrote:
}
} No .zsh* files at all... except that the unexpanded PROMPT keeps showing 
} up.

This almost certainly means ZDOTDIR and PROMPT (or PS1) were exported into
the environment of the launcher at some point, so that they were then being
inherited by every application that started up, including all of your new
terminals.


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

end of thread, other threads:[~2015-11-19  0:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-14 19:34 Why isn't zsh sourcing .zshenv ? TJ Luoma
2015-11-14 22:31 ` Bart Schaefer
2015-11-18 23:38   ` TJ Luoma
2015-11-19  0:28     ` Bart Schaefer

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