Skip to content

Allow command aliasing via PATH lookup #3608

@jandubois

Description

@jandubois

There have been several requests to add additional aliases to limactl commands, e.g. ps for list or ssh for shell.

Instead of adding more and more personal aliases into the app itself, I would like to see a generic command aliasing mechanism like git and kubectl already implement:

When a subcommand foo does not exist then limactl will look for limactl-foo on the PATH, and execute that program instead (passing all commandline arguments along).

Let's assume we add --running filter to the list subcommand, then a user could create limactl-ps:

#!/bin/sh
limactl list --running "$@"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clilimactl CLI user experienceenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions