| Ticket UUID: | 3189786 | |||
| Title: | option processing default incorrect for .arg and .secret | |||
| Type: | Bug | Version: | None | |
| Submitter: | guardus | Created on: | 2011-02-23 04:51:15 | |
| Subsystem: | cmdline | Assigned To: | andreas_kupries | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2011-02-24 00:43:35 | |
| Resolution: | Fixed | Closed By: | andreas_kupries | |
| Closed on: | 2011-02-23 17:43:35 | |||
| Description: |
It looks like a regexp is not escaped properly, so an option myarg creates a default m in the argument array.
I think the code
if {[regsub -- .arg$ $name {} name] == 1} {
should be
if {[regsub -- {\.arg$} $name {} name] == 1} {
I think the change needs to be done in two procs, ::cmdline::GetOptionsDefaults and ::cmdline::usage, with .arg and .secret, for a total of 4 lines changed.
Run the attached script "arg -h".
| |||
| User Comments: |
andreas_kupries added on 2011-02-24 00:43:35:
allow_comments - 1 Fully agreed on both bug and fix. The fix is now in the CVS head. Package version bumped to 1.3.3. Testsuite extended. guardus added on 2011-02-23 11:51:15: File Added - 402455: arg | |||
Attachments:
- arg [download] added by guardus on 2011-02-23 11:51:15. [details]
