- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我刚刚注意到动词样式命令参数的模式(在 git 和 .NET 的 CommandLineParser 库中),并想知道是否有人可以确认:myprog dothis -a "someArg"
-a
--arg
最佳答案
来自维基百科:https://en.wikipedia.org/wiki/Command-line_interface
类 Unix 系统中的选项约定
In Unix-like systems, the ASCII hyphen-minus begins options; the new (and GNU) convention is to use two hyphens then a word (e.g. --create) to identify the option's use while the old convention (and still available as an option for frequently-used options) is to use one hyphen then one letter (e.g. -c); if one hyphen is followed by two or more letters it may mean two options are being specified, or it may mean the second and subsequent letters are a parameter (such as filename or date) for the first option.
Two hyphen-minus characters without following letters (--) may indicate that the remaining arguments should not be treated as options, which is useful for example if a file name itself begins with a hyphen, or if further arguments are meant for an inner command (e.g. sudo). Double hyphen-minuses are also sometimes used to prefix "long options" where more descriptive option names are used. This is a common feature of GNU software. The getopt function and program, and the getopts command are usually used for parsing command-line options.
关于command-line - 命令行动词参数的约定 -a 与 --arg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42183794/
我是一名优秀的程序员,十分优秀!