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

Move env setup code from init script to autoinit process #462

Closed
xdelaruelle opened this issue Jun 3, 2022 · 0 comments
Closed

Move env setup code from init script to autoinit process #462

xdelaruelle opened this issue Jun 3, 2022 · 0 comments
Milestone

Comments

@xdelaruelle
Copy link
Member

Move as much environment setup code as possible from the shell initialization scripts to the autoinit internal process of modulecmd.tcl.

It targets:

  • module function exports
  • PATH setup for Modules bin location
  • MANPATH setup for Modules manpages
  • Source of completion scripts

Within modulecmd.tcl it will be simpler to perform these initialization tasks:

  • same code for every kind of shell
  • simpler in Tcl to check for duplicate entries
  • code already available to escape special characters ($, whitespace, etc)
@xdelaruelle xdelaruelle added this to the 5.2 milestone Jun 3, 2022
xdelaruelle added a commit that referenced this issue Jun 16, 2022
Add PATH setup in autoinit command instead of shell initialization
scripts. Use this way one modulecmd.tcl internal code instead of shell
code for every shell requiring to setup PATH with Modules binaries
location (sh, bash, ksh, zsh, csh, tcsh, fish).

Fixes #462.
xdelaruelle added a commit that referenced this issue Jun 16, 2022
Add MANPATH setup in autoinit command instead of shell initialization
scripts. Use this way one modulecmd.tcl internal code instead of shell
code for every shell requiring to setup MANPATH with Modules binaries
location (sh, bash, ksh, zsh, csh, tcsh, fish).

Fixes #462.
xdelaruelle added a commit that referenced this issue Jun 16, 2022
Add shell completion setup in autoinit command instead of shell
initialization scripts. Use this way one modulecmd.tcl internal code
instead of shell code for every shell having some completion to source
(bash, tcsh, fish).

Fixes #462.
xdelaruelle added a commit that referenced this issue Jun 16, 2022
Add zsh FPATH setup in autoinit command instead of zsh shell
initialization script. This way all the shell setup is gathered in the
autoinit process. What is left in initialization script is the code to
properly call the autoinit process.

Fixes #462.
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

1 participant