#show version info | ||||||||
#shutdown | ||||||||
输入 | text | state | begidx | endidx | line | compfunc(state==0时才调用) | Cmd->complete(self, text, state)返回 | 输出 |
场景1 | Tab | "" | 0,[1,2,3] | 0 | 0 | self.completenames() ['help', 'show', 'shutdown'] | self.completion_matches[state] | |
Tab | "" | 0,[1,2,3] | 0 | 0 | self.completenames() ['help', 'show', 'shutdown'] | self.completion_matches[state] | help show shutdown | |
场景2 | sTab | s | 0,[1,2] | 0 | 1 | self.completenames() ['show', 'shutdown'] | self.completion_matches[state] | h |
Tab | sh | 0,[1,2] | 0 | 2 | self.completenames() ['show', 'shutdown'] | self.completion_matches[state] | ||
Tab | show shutdown | |||||||
场景3 | shTab | sh | 0,[1,2] | 0 | 2 | self.completenames() ['show', 'shutdown'] | self.completion_matches[state] | |
Tab | sh | 0,[1,2] | 0 | 2 | self.completenames() ['show', 'shutdown'] | self.completion_matches[state] | show shutdown | |
场景4 | shoTab | sho | 0,[1] | 0 | 3 | self.completenames() ['show'] | self.completion_matches[state] | w |
Tab | show | 0,[1] | 0 | 4 | self.completenames() ['show'] | self.completion_matches[state] | show | |
场景5 | show Tab | "" | 0,[1~4] | 5 | 5 | [show ] | complete_show() ['version'] | self.completion_matches[state] |
Tab | "" | 0,[1~4] | 5 | 5 | complete_show() ['version'] | self.completion_matches[state] | version | |
场景6 | show verTab | ver | 5 | 8 | [show ver] | complete_show() | self.completion_matches[state] | sion |
python 自动补齐
最新推荐文章于 2022-07-29 16:42:51 发布