Skip to content

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

@wpoely86

Description

@wpoely86

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions