Closed cpaulik closed 8 months ago
Nonetheless, that should be a result consistent with what you see in your terminal, right? That is one goal of the package. I'm also a zsh
user, and ultimately I'd like to remove -i
/ -l
from the shell flags used by exec-path-from-shell
, but that will break things for some people too, so it's a probably a question of which bug reports I'd prefer to receive. :-)
(I am a bit surprised by that aspect of the zsh startup file order... I wonder what the reasoning is.)
The results were not consistent with what I have in my terminal since my terminal emulator does not start zsh as a login shell. I understand that such a change can be problematic but I wanted to let you know since I was also quite surprised. Feel free to close the issue if you decide not to change it in this way.
Thanks. I probably will close this, because there isn't a one-size-fits-all solution given the wide variety of shell configs people have. First I need to ponder things a bit more, I think. In the meantime, you can customise exec-path-from-shell-arguments
to minimise problems.
ultimately I'd like to remove -i / -l from the shell flags used by exec-path-from-shell, but that will break things for some people too
My current understanding is that bash
won't source any of ~/.bashrc
, ~/.bash_profile
, or ~/.profile
for a non-interactive non-login shell. You can specify a file for it to source via BASH_ENV
, but I suspect few people do that. If that's correct, I think bash
users will need at least one of -i
or -l
.
I could easily be misunderstanding, but that's what the man
page seems to say and a quick experiment seems to confirm it.
I know you're not planning to make any changes immediately but I was poking around at this stuff today and came across this issue. Let me know if I'm missing something - I'd love to have a better understanding.
Thanks @johnmastro, that's helpful background info.
I'd like to remove -i
and -l
, too.
My bash startup script detects if it starts as interactive login shell, if so, exec fish. The rationale behind this is, a program that need to be run by bash will not need interactive bash (interactive shells are for the user, not programs). And if I invoke bash manually, it won't be a login shell.
This causes bug in exec-path-from-shell.
I'd like to remove -i and -l, too.
You can easily do this:
M-x customize-variable RET exec-path-from-shell-arguments
Any suggestions how remove -i from within the Spacemacs configuration? I'm trying out Spacemacs after being long time Vim user
@aleksandersumowski
Any suggestions how remove -i from within the Spacemacs configuration? I'm trying out Spacemacs after being long time Vim user
Unsure, sorry, I don't use Spacemacs, but I understand it has its own config file scheme.
@aleksandersumowski You should be able to set the flags in your spacemacs config like in this example https://github.com/cpaulik/dotfiles/blob/master/.spacemacs.d.symlink/init.el#L368
I'd like to remove -i and -l, too.
Removing -i
is reasonable (see also #17) but removing -l
isn't, because then you skip reading .profile
, and that is where you should set PATH
and such things.
Removing -i is reasonable (see also #17) but removing -l isn't, because then you skip reading .profile, and that is where you should set PATH and such things
@Blaisorblade There is .zshenv for this.
@purcell Sorry for the noise, I was answering a comment about bash
(https://github.com/purcell/exec-path-from-shell/issues/40#issuecomment-220845253).
@Blaisorblade Oh right, cool - sorry!
Closing as this was mostly a question about shell config, and not clearly a fault with exec-path-from-shell
.
zsh sources
~/.zshenv
before the profile files (see here for loading order) which might overwrite the PATH. This happened to me on Arch because/etc/profile
contained: