HeadCase Command-Line Grammar
Slated for about August 2007, the HeadCase command-line interpreter is currently under development. It will provide a keyboard-oriented interface similar to a DOS or UNIX console session in which one can enter commands in a pseudo-natural language format. The motivation for this was seeing IT colleagues working at high productivity using such interfaces. They require some work to master and are possibly not a useful idiom for beginners, but are highly effective for power users for working fast since they do not required "juggling" between the mouse and keyboard.
General Design
The language is intended to be as natural as possible without demanding great verbosity. In general, a command consists of a verb followed optionally by a noun which can be qualified by preceding adjectives and parameterised with subsequent adjectives. Examples would be:
cd.. - Change selection to parent element. (After DOS.)
make red - make the current selection red.
make text red - make the text on the current selection red.
add 2-point black outline - Add an outline to the current selection.
select red branches - Select all the red branches in the current Mind Map.
make red branches black - Seems clear enough by itself.
Standard Nouns
"Word" - branch or block with that text. Word - embellishment with that identifying name. all noun - collection of all nouns as defined. first noun - first matching element first noun - first matching element everything - all nouns regardless of content, equivalent to all (wildcard) re "expr" - elements for which the regular expression matches. adjective+ noun - all nouns for which the adjective matches (e.g. all black outline) sibling - element at same level as selection child - element at level below selection descendant - element at any level below selection parent - element at level above selection parent - element at any level above selection
Standard Verbs
Make (noun)? - set the current selection or optional noun's properties to the value indicated del add select swap noun (and|\?) noun simplify
Use of Adjectives
Adjectives correspond to property values, optionally disambiguated with the property name. Examples might be:
red-to-black - colour pair for a faded fill.
2-point - width for a branch or outline.
[fill-colour:red;] - Style definition including HeadCase internal name to disambiguate the value.
Disambiguation will probably be necessary on occasion, although the design is such that common properties can be resolved by value alone. For instance, "2-point" would always be a width, and nouns (elements) normally only have one width value. Colours will be recognised by their HTML representation (&HRRGGBB) and also by their standard HTML names, so "make outline coral", for instance, will be interpreted correctly.
