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

Connect Lmod with command-not-found hooks in shell #746

Open
wpoely86 opened this issue Feb 2, 2025 · 0 comments
Open

Connect Lmod with command-not-found hooks in shell #746

wpoely86 opened this issue Feb 2, 2025 · 0 comments

Comments

@wpoely86
Copy link
Contributor

wpoely86 commented Feb 2, 2025

This is a cool idea completely stolen from @xdelaruelle his talk at FOSDEM 2025 ( https://fosdem.org/2025/schedule/event/fosdem-2025-4639-environment-modules-why-this-old-idea-is-still-useful-today-and-what-s-next/ ):

Image

Most shells have a 'hook' that will trigger if a command is given that does not exist. We could use this to suggest a module to load.

Origin is at https://github.com/codeandkey/mii

I guess it boils down to:

  • We should check all changes to PATH done by the modules. For those paths we need to check out the executables files in those paths
  • It needs to be stored in a cache which we can load very quickly where we connect a name with the modules that provides those names
  • use this cache in the shell hook.

Maybe I can find some time to do this. But I will just leave it here to be not forgotten.

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

No branches or pull requests

1 participant