Wikidata:Property proposal/has command line option
has command line option edit
Originally proposed at Wikidata:Property proposal/Natural science
Description | an option which is accepted by the software from the command line |
---|---|
Represents | option (Q28827890) |
Data type | String |
Domain | software (Q7397) |
Allowed values | regex: [a-zA-Z0-9]+ |
Example | cp (Q305946) → R, cp (Q305946) → f, cp (Q305946) → H, Windows Installer (Q181233) → help, Windows Installer (Q181233) → quiet |
Planned use | Add command line option information from The Open Group Base Specifications, Issue 7 (Q29466943) to standard UNIX utility or command (Q18343316) items. Add command line option information for other common Unix/Linux software. |
Motivation
On many operating systems, including those based on UNIX and Windows, software is designed to accept a number of options at runtime which impact how the software performs. This proposal doesn't capture the option prefix of - on UNIX systems and / on Windows systems. This is due to [1] stating that the prefix does not form part of the "option name".
Option-arguments (see option argument (Q28827897)) are also relevant, and could become a future qualifier property to this "has command line option" property proposal. "Operand" could also become a future property for software separate from this one (see Option-operand separation (Q7098998) for the reason why). Pixeldomain (talk) 04:44, 29 January 2018 (UTC)
Discussion
- Support David (talk) 16:27, 29 January 2018 (UTC)
- Comment I am worried that this might require many different claims. Would a tabular datatype fit your purpose? − Pintoch (talk) 17:08, 8 February 2018 (UTC)
- Comment @Pixeldomain: Perhaps there's a way to link to documentation of command-line options? Though described at URL (P973) maybe would suffice for that. Just providing the option name doesn't really tell you much - more important is what is the effect of that option? Also there are a number of variations - the use of '--' to prefix some options vs just '-', whether or not a command takes one or more non-option arguments (for example file names, which are not given the '-' prefix), whether options require a secondary argument or not (for example sort -k expects one or more field parameters) etc. ArthurPSmith (talk) 16:57, 9 February 2018 (UTC)
- Comment @ArthurPSmith: The Open Group Base Specifications, Issue 7 (Q29466943) states that the prefix of "-" must have one or more options that follow, each option being a single character. The prefix of "--" represents a single option whose name has more than one character that follows. It is a clear set of rules for how to prefix options/operands, and it wouldn't make sense to include the prefixes. Handling of option argument (Q28827897) and option (Q28827890) which don't have names (but are expected in a predefined order) are trickier to model. To handle option argument (Q28827897), a new "option-argument" qualifier property could be created which expects an item such as filename (Q1144928), process identifier (Q1541645), etc. Another qualifier that could be used is has effect (P1542) which describes what effect/impact the option has on the software. The items for has effect (P1542) would need to be fairly specific such as "output results in descending numerical order", "output results in ascending date order", "include processes owned by specified user in output results", "minimise output verbosity". Pixeldomain (talk) 01:08, 12 February 2018 (UTC)
- Support Ok, I like the idea of using has effect (P1542) as a qualifier to describe the effect of the option, this does sound quite useful then. @Pintoch: I don't think there are many cases of command-line programs with more than 2 dozen or so options (ok, 'ls' has 38 on my system here, but that's a bit extreme), at least for the scope Pixeldomain has defined here of standard UNIX utilities and related software, so I don't think it's a big deal to add those statements within wikidata itself. ArthurPSmith (talk) 15:25, 12 February 2018 (UTC)
@Pintoch, ديفيد عادل وهبة خليل 2, Pixeldomain, ArthurPSmith: Done: has command line option (P4837). − Pintoch (talk) 11:33, 13 February 2018 (UTC)