Skip to content

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

Open

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.

Activity

  1. kcgthb commented on Feb 19, 2025

    @kcgthb
    Contributor

    That's a great idea, it would be a killer feature!👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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