cmdr::validate::common - Cmdr - Utilities for Validation Types
Welcome to the Cmdr project, written by Andreas Kupries.
For availability please read Cmdr - How To Get The Sources.
This package publicly exports three commands for use in the implementation of validation types. The standard validation types defined in package cmdr::validate make use of these commands.
When invoked this command throws an error indicating a validation type failure. The arguments provide the information used to construct both error message and code.
The cmdr::parameter instance whose validation failed. The error message will contain this parameter's type and label (flag in case of an option).
A list providing additional elements for the error code, detailing the internal name of the validation type triggering the error.
A string providing the human-readable name of the validation type triggering the error.
The string value failing the validation.
When invoked this command returns a list of strings containing just the elements of choices the value of buffer is a prefix of. When nocase is set the command will ignore letter case and treat the string in buffer as all-lowercase.
The list of values which can complete the data in buffer.
A boolean flag specifying if the completion is done ignoring letter-case (true), or not (false)).
The string to complete via the list of choices.
When invoked this command returns a list of strings, the paths in the filesystem the value of buffer is a prefix of, and not rejected by the filter command (prefix).
Note that when the value of buffer is a relative path the current working directory is used to locate matches.
A command prefix taking a single argument, the candidate path, and returning a boolean value indicating (non-)acceptance of the path. A result of true accepts the candidate, false rejects it.
The string, a partial path, to complete.
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 Andreas Kupries
Copyright © 2013 Documentation, Andreas Kupries