Ticket UUID: | 59c60db96169e20200d920443be8663d40863bc5 | |||
Title: | cmdline - not work correctly when options without dash prefix appear before options with dash | |||
Type: | Bug | Version: | 1.19 | |
Submitter: | anonymous | Created on: | 2018-10-18 11:18:48 | |
Subsystem: | cmdline | Assigned To: | aku | |
Priority: | 5 Medium | Severity: | Important | |
Status: | Open | Last Modified: | 2019-04-15 23:24:43 | |
Resolution: | None | Closed By: | nobody | |
Closed on: | ||||
Description: |
In GNU C library, the getopt() or getopt_long() function modifies the order of argv to move all operands(options without dash prefix) to the end of argv. So, for example, "cp fileA fileB -p" works well same as "cp -p fileA fileB". In cmdline package, this did not work. By the way, GNU getopt() did not modify the contents of argv except for the order of elements. It provides a variable "optind" as index pointing to the first operand in argv. | |||
User Comments: |
aku added on 2019-04-15 23:24:43:
At the moment the title comes across as 'this is a bug' (due to the phrase 'not work correctly' in it). The description on the other hand feels more like a feature request: 'make cmdline more similar to getopt'. Please provide an example which demonstrates what Tcllib's cmdline did versus what you expected it to do. |