Commit Graph

14 Commits

Author SHA1 Message Date
Jiří Setnička cffdf641d1 Dynamic autocompletion (#60)
* Dynamic autocompletion implemented

Now there is a new item type "PcItemDynamic" which takes function as
parameter.

When it comes to autocomplete at this position, the function is called,
the whole line is given to it (for example if autocompletion depend on
previous autocompleted field) and functio should return possible strings
how to continue.

Example usage:
 * listing some dynamic key-value storage
 * listing files in directory

* Dynamic autocompletion: Updated example

* Dynamic autocompletion: Internal Do() is passing the original full line

To serve it to dynamic autocompletion functions. Previously passed line
was only following segment (which doesn't work).

* Dynamic autocompletion: New dynamic interface added + type assertion in Do function

Do function was split into doInternal with changed declaration and Do
with original declaration.
2016-07-26 21:39:09 +08:00
Michal Pristas e3e573aa21 Auto complete with space prefixed line (#46)
* auto-complete gets displayed even with space characters prefixing the line

* demo test back to chzyer;
2016-04-08 10:01:57 +08:00
chzyer 6cc043de37 Fix #43 , remove sub-package for gopkg compatiblity 2016-04-05 09:55:46 +08:00
招牌疯子 3138d3552b add SetChildren for prefix completer interface 2016-03-16 18:03:13 +08:00
Dan Cripe 7f88ba2640 Add Tree() method back in.
Needed for one of the examples and for backward compatability.
2016-01-07 09:54:10 -06:00
Dan Cripe d0e806295b Use refactored code instead of original. 2016-01-07 09:42:12 -06:00
Dan Cripe e0fe5c6252 Reimplement in a compatible way.
Signed-off-by: Dan Cripe <dan@quattronetworks.com>
2016-01-06 18:46:43 -06:00
Dan Cripe f89cf57370 Change implementation drastically.
Signed-off-by: Dan Cripe <dan@quattronetworks.com>
2016-01-06 17:39:08 -06:00
Dan Cripe cd2d269a73 Hack to allow dynamic content in autocompletion.
Signed-off-by: Dan Cripe <dan@quattronetworks.com>
2016-01-06 15:41:13 -06:00
Cheney c1adc97620 example: improve usage content 2015-11-20 21:32:53 +08:00
Cheney 9364259fb1 #15: fix prefix completer 2015-11-14 10:21:55 +08:00
Cheney 55809b401d add runes package 2015-10-04 21:56:34 +08:00
Cheney a8eaa99c90 fix bugs in PrefixCompleter 2015-09-27 00:10:26 +08:00
Cheney d07044cdb6 add prefix completer 2015-09-26 00:31:09 +08:00