What does double dash (--) implies in Selenium ChromeOptions

…衆ロ難τιáo~ 提交于 2021-01-27 13:02:24

问题


I am using selenium with java and I am using some chrome options with it. But I see different usages of chrome options in different sources. I mean some folks using double dash before the option and some do not (like disable-dev-shm-usage and --disable-dev-shm-usage). Are there any differences between the two usages?


回答1:


As per Command-Line Options:

Unix tradition encourages the use of command-line switches to control programs, so that options can be specified from scripts. There are three conventions to distinguish command-line options from ordinary arguments as follows:

  • The original Unix style
  • The GNU style
  • The X toolkit style

The GNU style uses option keywords (rather than keyword letters) preceded by two hyphens. It evolved years later when some of the rather elaborate GNU utilities began to run out of single-letter option keys (this constituted a patch for the symptom, not a cure for the underlying disease). It remains popular because GNU options are easier to read than the alphabet soup of older styles. GNU-style options cannot be ganged together without separating whitespace.

The GNU double-hyphen option leader was chosen so that traditional single-letter options and GNU-style keyword options could be unambiguously mixed on the same command line.



来源:https://stackoverflow.com/questions/60039687/what-does-double-dash-implies-in-selenium-chromeoptions

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