cmdArgs bash completion

谁说我不能喝 提交于 2019-12-04 05:23:23

To use the bash completion, compile the above program as sample, place sample on your $PATH then run:

sample --help=bash > sample.comp
source sample.comp

You can now type in sample --ver, press tab, and it will complete to sample --version.

There are a couple of infelicities in the completion, in particular the program must be on your $PATH and if you are on Windows you need to run sample.comp through dos2unix. It is also entirely undocumented, which sHould be fixed by the package author.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!