-
Notifications
You must be signed in to change notification settings - Fork 132
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
FPATH gets carried to ZSH when using bash, even when SUPPORT_KSH is set to "no" #555
Comments
As you may know, the issue is that both Zsh and Ksh use FPATH but not in the same way. The other issue is that some bash users run ksh scripts. Sites can control the default state at configure time by setting --with-supportKsh=no. This will of course disable support for bash users running ksh scripts that have module commands. The change that I have made is that those bash users can add :
to their startup script so that when they start zsh, lmod change FPATH. You can test this yourself by adding:
at line 26 in init/bash.in and then re-install Lmod. Note that bash users can also unset FPATH in their bash startup scripts At TACC we do allow for user to choose their shell either bash, zsh or tcsh if that is of any help. This change has been checked-in to the master branch if you want to test it. Thanks very much for the but report! |
O.K. to close this issue? |
Thanks for the reply. Ir’s interesting that a change which can break zsh, which is being favored more recently, in favor of ksh, which is not becoming more popular, is an opt-out instead of opt-in. How about the opposite? Where one set explicitly that wants to use ksh. That seems more sustainable in the long term, as less people will need this. |
I agree that Zsh is a better shell. It is my shell on all the systems I have access to. The trouble is many of the weather codes use ksh scripts and we have to support them. Those will change very slowly. But I don't control whether this is the default or not. Sites do. In fact the unconfigured value for --with-supportKsh is no and has always been. So someone at your site has decided to support KSH scripts. That is outside my control. Also KSH script are not supported if the user's startup shell is zsh. Over time, HPC sites should support zsh as it is getting more popular since Mac have made it their default shell. Also if you are having your bash startup scripts start zsh then you are already a sophisticated user and you can clear FPATH or set SUPPORT_KSH=no in your startup scripts before "exec zsh". I have added a section to the Lmod FAQ to remind bash->zsh users about the FPATH issue. |
Interestingly not. I got this on a new cluster I’m assembling, it doesn’t have climate models yet. But fine, if you say that’s the default, I won’t be bugging you. And as now I know how to fix things, it’s fine. We can close this one. |
There was a mistake in the bash startup script. Current it has:
Since just about everyone is connecting over SSH, this means that every bash user is ignoring $SUPPORT_KSH. In the next Lmod release this block code becomes:
|
Awesome! Thanks a lot! |
…andle SUPPORT_KSH only as a configuration setup
On
Lmod/init/bash.in
Line 28 in de1b731
Using bash, I get
Which messes up with zsh prompts, for example, because they use the same variable for their stuff.
Many supercomputer users load zsh on top of bash, as they can't change the default shell set up by the sysadmins. So the FPATH gets carried away to ZSH and breaks stuff there, as you know already.
Interestingly, even when
SUPPORT_KSH
is set tono
, the change happens.The text was updated successfully, but these errors were encountered: