Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
カスタムのオートコンプリート コマンドがあります (それを と呼びますcommandA)
commandA
commandAのcommandB最初の引数のオートコンプリート オプションを盗みたい
commandB
たとえば、commandA の引数 1 のオプションは次のとおりです。
abcdef abcabc abc123
abcdef
abcabc
abc123
上記のリストを生成するcompgen -? "commandA"か、その行に沿って何かをしたいと思い ます。compgen -? "commandA abc"
compgen -? "commandA"
compgen -? "commandA abc"