remkop / picocli

Picocli is a modern framework for building powerful, user-friendly, GraalVM-enabled command line apps with ease. It supports colors, autocompletion, subcommands, and more. In 1 source file so apps can include as source & avoid adding a dependency. Written in Java, usable from Groovy, Kotlin, Scala, etc.
https://picocli.info
Apache License 2.0
4.88k stars 420 forks source link

AutoComplete with jline3 is showing hidden commands. #2331

Closed clebertsuconic closed 1 week ago

clebertsuconic commented 1 month ago

2074 fixed an issue with jline3 showing auto-complete for hidden attributes.

I just realized that hidden commands are also showing, so the fix for hidden attributes has to be somehow applied into commands as well.

As I was working on https://github.com/apache/activemq-artemis/pull/5132, I wanted to hide a command from the Shell, but hiding is not working for the Shell.

It's not such a big deal for me, so I will just remove the command for good in this case.. but it would be nice to have this fixed eventually.

remkop commented 1 month ago

Thank you for raising this! Will you be able to provide a pull request for this?

remkop commented 1 week ago

Fixed in the main branch. Could you test this if you have a chance?

clebertsuconic commented 1 week ago

Sorry I couldn't fix this myself this time.

I will test this soon and let you know here.