【发布时间】:2016-11-02 21:10:37
【问题描述】:
我正在开发自己的库来解析 argc/argv 数据。我在想git。 git 参数是如何工作的?
例子:
git commit -m "消息"
这里,commit 不是一个选项,因为它没有连字符。有没有地方解释过这种命令行选项行为?
我知道我的库会比 TCLAP 或 CLAP 差,但我不能使用外部库。
编辑:有趣的链接 -> https://softwareengineering.stackexchange.com/questions/70357/command-line-options-style-posix-or-what
【问题讨论】:
-
argparse,用于解析命令行参数的 Python 标准库,将这种类型的参数称为子命令。
标签: git command command-line-interface