chzyer / readline

Readline is a pure go(golang) implementation for GNU-Readline kind library
MIT License
2.06k stars 273 forks source link

How to achieve auto completion after user input a not fix parameter? #192

Open li9270 opened 2 years ago

li9270 commented 2 years ago

For example, the command may be: get 0 status get 0 config get 1 status get 1 config The first cmd get is fix, the second cmd is not fix, may 0, or 1, 2, 3 ......, the third cmd is fix, may status or config. The wanted result: I input the cmd "get 0", the press the tab, I want to get prompt: status config. But I have not find out the modify methord. Did anyone has any suggestion? Thanks a lot !