hoaproject / Console

The Hoa\Console library.
https://hoa-project.net/
366 stars 32 forks source link

New feature: CLI-like autocompleter #10

Open guiled opened 10 years ago

guiled commented 10 years ago

Is it possible to provide a context to autocompleter in order to suggest word depending on current string. An exemple of what I am talking about

git br would suggest "branch" exec br would suggest "break"

Words would be suggested depending on the whole string

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1504201-new-feature-cli-like-autocompleter?utm_campaign=plugin&utm_content=tracker%2F459935&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F459935&utm_medium=issues&utm_source=github).
Hywan commented 10 years ago

Hello :-),

More than “contextual”, I think we have to classify autocompleters by domains they address. Is it for a CLI-like shell interface?

guiled commented 10 years ago

Yes it is!

Hywan commented 10 years ago

I have renamed the issue :-).

Hywan commented 10 years ago

First of all, such an autocompleter must (could?) not be aggregated. Should we create an “aggregable” interface to distinguish autocompleters? /cc @jubianchi

jubianchi commented 10 years ago

@Hywan IMHO, you should not make such decision and let the developper using autocompleters decide wether his autocompleters should or should not be aggregated.

We can(t figure out every use cases so I would let all autocompleters be “aggregable” by default.

vonglasow commented 10 years ago

+1 for this issue ;)