我似乎无法找到每行使用多个命令的示例.
例如,假设我想写一个类似于cisco ios的cli,你可以在一行上有多个级别的命令.
例如.第一个单词可以是"show",然后当你输入"show"并点击tab时,会显示下一组选项(cisco exmaple使用"?"来显示列表).
eg:
gw1#show ?
aaa Show AAA values
access-expression List access expression
access-lists List access lists
accounting Accounting data for active sessions
adjacency Adjacent nodes
..
gw1#show ip ?
access-lists List IP access lists
accounting The active IP accounting database
admission Network Admission Control information
aliases IP alias table
arp IP ARP table
..
gw1#show ip interface ?
ATM ATM interface
Async Async interface
BVI Bridge-Group Virtual Interface
CDMA-Ix CDMA Ix interface
..
gw1#show ip interface …Run Code Online (Sandbox Code Playgroud)