Fossil SCM

option parsing error

Closed

f673f7e40656fa3… · opened 17 years, 2 months ago

Type
Code_Defect
Priority
Severity
Important
Resolution
Fixed
Subsystem
Created
Feb. 9, 2009 5:35 a.m.

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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button