-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
posix sh/dash/bash #191
Comments
All rbenv scripts are written in bash and the shebang is always On Ubuntu and OS X, bash is the standard login shell, so writing rbenv in bash makes sense. (Ubuntu users are mainly experiencing problems when installing rbenv because ~/.bash_profile is read only once at login, while on OS X it's read for each new terminal session.) |
Dash is used to run ~/.profile when logging into Gnome on Ubuntu. And ~/.bash_profile is only read when logging in via terminal or ssh when your shell is Bash. |
Are you 100% sure? At least on Ubuntu 10.04, ~/.profile is only sourced by /bin/bash at login. I've never heard that dash is used as a login shell (only login shells are supposed to read ~/.profile). |
/etc/gdm/Xsession has #!/bin/sh |
I see. That would be a dependency introduced by gdm and not some implicit sourcing of ~/.profile by dash run as login shell. (I did some Googling and people seem to complain about /etc/gdm/Xsession using /bin/sh.) |
You're right. The login shell is used, not dash, but only ~/.profile is read, not ~/.bash_profile or ~/.zprofile. |
If someone uses dash, they will realize they have to put startup configuration in a generic file like Closing |
There seem to be issues on Ubuntu (Debian?) around which shell (dash/bash) is run and which rc/profile files are loaded.
It seems that the following gives a set of issues to be considered by anyone wishing to code review or make changes to bash scripts.
https://wiki.ubuntu.com/DashAsBinSh
Perhaps this github issue, or the page above, can be referenced when making pull requests.
Should the bash script segments/snippets should be made dash compatible?
Or should dash be added as another target in addition to ksh and zsh?
Thoughts?
The text was updated successfully, but these errors were encountered: