View Ticket
Not logged in
Ticket UUID: f673f7e40656fa3430edea398162596538797fd7
Title: option parsing error
Status: Closed Type: Code_Defect
Severity: Important Priority:
Subsystem: Resolution: Fixed
Last Modified: 2009-02-09 18:11:42
Version Found In: 8be6204607
Description & Comments:
I don't fully understand command-line option parsing, _but_:

fossil commit -branch "my branch" -bgcolor #ffaabb

has the 'bgcolor' option returning a value of "my branch". This is incorrect. It appears that somewhere in the chain of command-line option parsing, "#" is interpretted as a comment,and it + rest of line is ignored (??).

*If* this is the case, -bgcolor should be recognized as missing an option,and throw an error.

Optionally (preferably?) it would be nice to not require quoting or escaping for "#" chars.


bharder added on 2009-02-09 05:49:08:
'#' handling is either intrinsic to shell, or C. argc does reflect proper number of args, though, and we should check.


anonymous claiming to be Ge' Weijers added on 2009-02-09 17:46:37:
'#' is the comment character of the Bourne shell (/bin/sh), and therefor also for derived shells such as 'bash'. It's a feature, not a bug :-)


bharder added on 2009-02-09 18:11:42:
fixed with commit f80303ac73