cmdr-changes - Cmdr - Log of Changes
Welcome to the Cmdr project, written by Andreas Kupries.
For availability please read Cmdr - How To Get The Sources.
This document provides an overview of the changes cmdr underwent from version to version.
Extended the package cmdr::validate with many new standard validation types:
Posint (positive integers, > 0)
Paths and channels
Readable path, as channel
Writable path, as channel
Read/writable path, as channel
Date and time related:
In package cmdr::validate, modified the integer validation type to have a proper internal representation: decimal. Input in octal, hex, etc. is now normalized to this.
Extended package cmdr::validate::common with more helper commands for the generation of validation failure messages
Added various new supporting packages:
Test for terminal.
Color management, ansi control sequences.
User interaction commands.
Text display with automatic invokation of a pager for tall output.
Pluggable management of command history.
Table formatting, a simplified interface to Tcllib's struct::matrix and report packages.
Even more validation types, now as wrappers around the validation commands provided by Tcllib:
Extended package cmdr::officer with
Support for per-officer options. The most common use case will likely be the declaration of global options in the root officer.
Related to this, a new common block *config* is set to the active config instance, which will be different from the defining instance, for per-officer options. This gives the per-officer options access to the arguments (and options) of the current command, instead of only their own sibling options.
Support for an option -extend for common blocks, allowing their extension in a subordinate instead of just replacing the entire content.
Support to accept all unique command prefixes of an officer's subordinates for dispatch.
Extended package cmdr::parameter with
Support for the specification of negative aliases for boolean options, i.e. representing the inverted option.
See the DSL commands neg-alias and !alias in Cmdr - Parameter Specification Language.
Support for option labeling, for use in the generated help, to make it more descriptive. Options for which no label is specified will use their name as fallback.
See DSL command label in Cmdr - Parameter Specification Language.
Help system changes
Modified it to use the short format for interior nodes of the command hierarchy by default.
Modified it to exclude auto-added commands from the output generated by format by-category.
Modified the format full to show the option arguments for those which have such. See also the extension of package cmdr::parameter with support for option labels, this is what is used here.
Modified it to declare a standard global option --help (with aliases -h and -?). Using the option invokes the standard help (command) on the current command, if any, or the global help if there is no command.
Modified to use a minimum width of 10 characters for descriptions. If the user narrowed the terminal this far then having the text either cut off at the right edge, or wrapped around is not worse then the help trying to wrap the sentence with word boundaries, etc. Also, trying to use negative width threw Tcl errors.
Fixed the handling of common block *all* in package cmdr::officer. While it was ok trapping and ignoring a missing definition of this block, trapping everything which could go wrong was not.
Fixed a long-standing bug of package cmdr::config in the forced calculation of parameter values in method Force). Any error in the calculations left an internal flag set, causing future invokations to believe to be in a recursive call and thus do nothing.
While this had no effect on regular operation, i.e. with the application exiting after each command, in interactive mode this misbehaviour disabled all checks and validations for the command in question, and also retained old parameter values.
Modified the formatting of cmdr::config state when interactively entering it for a private. Parameter names now are shown as declared, and an additional flag character indicates if it is inherited from above, or not.
General fixes to testsuite, code comments, bogus variable names, typos in error messages, etc.
Fixed initialization issues in the help generator.
Fixed generated help, added the application name to the output when in a cmdr shell.
Fixed the generation of help format by-categorized, when encountering sections with sub-sections and no commands of their own.
Fixed bad method scoping in method extend of officers.
Extended officer method extend to return the created private, for immediate post-creation re-configuration.
Extended system with new help format tcl, and associated package cmdr::help::tcl. Similar to format json the help is printed as a nested data structure, just using Tcl syntax.
Extended officers and privates with method find for path lookup of sub-ordinates.
This is the first release of cmdr. The changes therefore describe the initial features of the system.
cmdr requires Tcl 8.5 or higher. Tcl 8.4 or less is not supported.
The framework provides a DSL for the declaration of a hierarchy of commands and their parameters (named options, positional arguments, hidden state), with help texts, type information, and various callbacks (command actions, parameter definition, parameter completion, type validation, command completion, etc.)
At runtime the framework provides parsing and processing of command lines per specifications written in that DSL, determining the command to run, and the mapping from command line words to its parameters.
The framework also provides shells for the interactive entry of commands and parameters, with command line completion.
Last, but not least is the automatic generation of command line help for commands and parameters, based on the information provided in a specification.
Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Cmdr Tickets.
Please also report any ideas you may have for enhancements of either package(s) and/or documentation.
arguments, command hierarchy, command line completion, command line handling, command tree, editing command line, help for command line, hierarchy of commands, interactive command shell, optional arguments, options, parameters, processing command line, tree of commands
Copyright © 2013-2016 Andreas Kupries
Copyright © 2013-2016 Documentation, Andreas Kupries