Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENV_ROUTE clarification #303

Open
mrclary opened this issue Jan 18, 2022 · 1 comment
Open

ENV_ROUTE clarification #303

mrclary opened this issue Jan 18, 2022 · 1 comment
Assignees

Comments

@mrclary
Copy link

mrclary commented Jan 18, 2022

@steff456 , I don't mean to bombard you with issues on this plugin, but I have some questions about the terminal setup.

What is the intention of the terminal plugin? Is is supposed to emulate an interactive login shell?
The reason I ask is that the ENV_ROUTE for bash and zsh may need some adjustment.

  1. For bash, I'm not aware of any circumstance in which both ~/.bashrc and ~/.bash_profile are sourced. The expected source files are:
    • Interactive login: first /etc/profile then the first available of ~/.bash_profile, ~/.bash_login, or ~/.profile
    • Interactive non-login: first /etc/bashrc then ~/.bashrc
  2. For zsh, all files are sourced, in order, if they exist:
    • Interactive login: /etc/zshenv, $ZDOTDIR/.zshenv, /etc/zprofile, $ZDOTDIR/.zprofile, /etc/zshrc, $ZDOTDIR/.zshrc, /etc/zlogin, and $ZDOTDIR/.zlogin
    • Interactive non-login: /etc/zshenv, $ZDOTDIR/.zshenv, /etc/zshrc, $ZDOTDIR/.zshrc

Additionally, do you know where environment variables are passed to new terminals? Maybe it's somewhere in terminado? For the macOS standalone application, some environment variables need to be removed, e.g. PYTHONHOME and RESOURCEPATH.

@steff456
Copy link
Member

Hi @mrclary, don't worry about opening issues!

The main idea behind this plugin is to have a console inside Spyder that works as close to a system terminal as possible. This is the reason why we decided to try to import all the configurations that may be modified by the user, specially to have all the conda paths available inside the terminal.

Maybe this can help,

env = self.make_term_env(**options)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants