Login
Changes To f-tools
Login

Changes to "f-tools" between 2013-08-14 19:35:51 and 2013-08-14 19:38:05

70
71
72
73
74
75
76
77

78
79
70
71
72
73
74
75
76

77
78
79







-
+



# Cancel that color:
# f-tag -a current -t -bgcolor -v 'that was uglier than i thought it would be'
</pre></nowiki>

Values are always optional but Fossil internally treats some tag names specially and may require (or expect) a value. The <tt>bgcolor</tt> tag is one example. When cancelling a tag, the value is always optional, regardless of whether or not it is a special tag.

When adding a tag, the tag name may optionally be prefixed with a <tt>+</tt> sign, for symmetry with the cancel (<tt>-</tt>) and propagate (<tt>*</tt>) markers. Cancel tags might <em>look</em> like options/flags because they start with a minus, but they are not interpreted as a flag due to a happy accident of design. When using propagating tags, it is wise to enclose the tag in quotes to prevent any unwanted side-effects of shell globbing.
When adding a tag, the tag name may optionally be prefixed with a <tt>+</tt> sign, for symmetry with the cancel (<tt>-</tt>) and propagate (<tt>*</tt>) markers. Cancel tags might <em>look</em> like options/flags because they start with a minus, but they are not interpreted as a flag due to a happy accident of design. When using propagating tags, it is wise to enclose the tag in quotes to prevent any unwanted side-effects of shell globbing. Optionally, use <tt>-t=*tagname</tt>, which would only match a glob in the most unusual of circumstances. Likewise, <tt>-t=-tag-to-cancel</tt> can be used if having the tag value look like a flag seems disturbing to you.

Note that the +/-/* prefixes were not chosen arbitrarily: they reflect how Fossil internally stores and recognizes the type of a tag: <tt>+</tt> represents an "add tag", <tt>-</tt> a "cancel tag" (a.k.a. "anti-tag"), and <tt>*</tt> a propagating tag.