Skip to content
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

Add setter for name in picocli.shell.jline3.PicocliCommands #2031

Closed
remkop opened this issue May 25, 2023 · 1 comment
Closed

Add setter for name in picocli.shell.jline3.PicocliCommands #2031

remkop opened this issue May 25, 2023 · 1 comment
Labels
theme: shell An issue or change related to interactive (JLine) applications type: API 🔌
Milestone

Comments

@remkop
Copy link
Owner

remkop commented May 25, 2023

I see that I can print picocliCommands.name() ... can you provide a setter?

It took me a while to find it, but it looks like the name() method is defined in JLine's CommandRegistry interface:

// org.jline.console.CommandRegistry
    default String name() {
        return this.getClass().getSimpleName();
    }

Yes, we can make a setter, I can see how this would be useful.
Meanwhile, to change it, please subclass the PicocliCommands class in your project and override the name() method.

Originally posted by @remkop in #2028 (reply in thread)

@remkop remkop added this to the 4.8 milestone May 25, 2023
@remkop remkop added type: API 🔌 theme: shell An issue or change related to interactive (JLine) applications labels May 25, 2023
@remkop remkop modified the milestones: 4.8, 4.7.4 Jun 3, 2023
@remkop
Copy link
Owner Author

remkop commented Jun 3, 2023

A setter has been added.

@remkop remkop closed this as completed Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: shell An issue or change related to interactive (JLine) applications type: API 🔌
Projects
None yet
Development

No branches or pull requests

1 participant