pseyfert / lb-zsh

zsh goodies for LHCb
GNU General Public License v3.0
2 stars 1 forks source link

lb-run shell usage #9

Open pseyfert opened 8 years ago

pseyfert commented 8 years ago

Starting shells with lb-run Project version shell is not unproblematic. (the login scripts get sourced again after lb-run defined the correct environment, resulting in bad paths prepended to e.g. the python path). My current workaround is

lb-run Project version shell -f
source .shellrc

This gets the user defined goodies without the system defined problems. Is there a oneliner solution?

pseyfert commented 8 years ago

I usually run a self built zsh instead of the standard login shell. So to avoid the problem in the first place I built zsh with --disable-etc. The environment in such a shell is about identical to that defined by lb-run (up to SHLVL and _).

I mark the issue for now as won't fix despite the fact that the solution is terribly suboptimal.

pseyfert commented 8 years ago

NB: subshells started this way come without (LbLogin) aliases. i.e. your own ~/.zshrc aliases are defined, but SetupDaVinci is not. For lb-run shells this hardy matters (won't do SetupX in those) but if one just starts a self-compiled shell to have a better shell these aliases will be missed.

Discussing the matter on stackexchange I am tempted to:

the second hack actually brings us back close to the initial one-liner problem -- doing some sourcing based on quick diagnosis in ~/.zshrc, just that all the /etc is left and locked out.