abiosoft / ishell

Library for creating interactive cli applications.
MIT License
1.69k stars 196 forks source link

auto complete contains childrens even if completer is set #72

Closed jialeicui closed 2 years ago

jialeicui commented 6 years ago

10

abiosoft commented 6 years ago

If I get this right, you want autocomplete to include children for custom completers. I do not think this is the desired behaviour for everyone. I feel there should be a way to toggle this.

jialeicui commented 6 years ago

Completer is just a completer, not a validator, the autocomplete of sub cmds already done by ishell.
In my opinion, people use Completer porvide validated arguments, not sub commands, and sub command itself knows when it can be executed, so is it better to support a func like validate for each cmd?