Skip to content

Feature request: ability to prefix all commands in a ShellComponent #564

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

Closed
klr8 opened this issue Oct 27, 2022 · 1 comment
Closed

Feature request: ability to prefix all commands in a ShellComponent #564

klr8 opened this issue Oct 27, 2022 · 1 comment

Comments

@klr8
Copy link
Contributor

klr8 commented Oct 27, 2022

It would be useful to have the ability to prefix all commands defined in a ShellComponent.
For instance:

@ShellComponent(prefix = "backend")
public class BackendCommands {

    @ShellMethod("Connect to the backend.")
    public void connect(String token) throws Exception {
        ...
    }
}

This would result in a "backend.connect" command.

A prefix ability would allow more consistency in command naming. For instance, you could also have "db.connect" and "kibana.connect" commands. Furthermore, using command line completion after typing the "backend" prefix would give you a nice overview of all backend related commands.

@jvalkeal
Copy link
Contributor

I'm closing this in favour of #637. New annotation model is going to better designed and will allows to do these type of things more easily.

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

2 participants