Skip to content

feat: add command aliasing via PATH lookup #3834

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

Merged

Conversation

olamilekan000
Copy link
Contributor

Change adds a feature that allows users to create custom limactl-* commands 
that are automatically discovered and executed when unknown subcommands are used.

implements issue

@olamilekan000 olamilekan000 force-pushed the allow-cmd-alias-via-path-lookup branch from 9186de0 to 47a01ac Compare August 14, 2025 15:42
@jandubois jandubois linked an issue Aug 14, 2025 that may be closed by this pull request
@jandubois
Copy link
Member

I wonder if we should prefix PATH with filepath.Dir(os.Executable()) before launching the plugin, so if the plugin calls limactl it will run the same binary that launched the plugin. Doesn't matter most of the time, but can be helpful when you are testing with e.g. _output/bin/limactl PLUGIN.

@olamilekan000 olamilekan000 force-pushed the allow-cmd-alias-via-path-lookup branch from 47a01ac to c31cd55 Compare August 14, 2025 23:24
@olamilekan000 olamilekan000 force-pushed the allow-cmd-alias-via-path-lookup branch from c31cd55 to be90be8 Compare August 15, 2025 08:23
@olamilekan000 olamilekan000 force-pushed the allow-cmd-alias-via-path-lookup branch from be90be8 to 709f199 Compare August 15, 2025 08:27
@olamilekan000 olamilekan000 force-pushed the allow-cmd-alias-via-path-lookup branch 2 times, most recently from 5c67f1b to efdf5a4 Compare August 16, 2025 00:17
@olamilekan000 olamilekan000 force-pushed the allow-cmd-alias-via-path-lookup branch from efdf5a4 to de27621 Compare August 16, 2025 01:03
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, noticed one more edge case, but I think after this change it will be good.

@olamilekan000 olamilekan000 force-pushed the allow-cmd-alias-via-path-lookup branch from de27621 to c2c63f3 Compare August 16, 2025 03:01
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@jandubois jandubois added this to the v2.0.0 milestone Aug 16, 2025
@jandubois jandubois merged commit 2f01516 into lima-vm:master Aug 16, 2025
36 checks passed
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

Successfully merging this pull request may close these issues.

Allow command aliasing via PATH lookup
3 participants