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

Better shell initialisation. #1965

Merged
merged 2 commits into from
Jan 28, 2015
Merged

Better shell initialisation. #1965

merged 2 commits into from
Jan 28, 2015

Conversation

AltGr
Copy link
Member

@AltGr AltGr commented Jan 28, 2015

Ref: #1447 (waiting for reviews and tests before closing)

Previous behaviour was wrong: update .bash_profile if it exists, .bashrc otherwise.
This now respects loading order of bash for login shells to be sure we update
the file that will be loaded.

Still, bash loads distinct files, exclusively, in login and non-login mode: either
one of the profiles, or .bashrc. Unless you include one from the other, which many
do, but you can't rely on that. We may end up having to load variables from _both_
files to handle both cases, loading them twice being harmless ; but I hope we don't
need to.

In non-interactive mode, bash doesn't load any specific files (except if BASH_ENV
is defined, but defining it would be the same problem) so we're out of luck anyway.
--zsh, etc. were incomplete (no --bash !) and heavy-weight. Using
--shell=x with an enum is better, and while incompatible, shouldn't
cause trouble, you don't use it everyday.
AltGr added a commit that referenced this pull request Jan 28, 2015
@AltGr AltGr merged commit c9aca74 into ocaml:master Jan 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant