cmdr::history - Cmdr - Utilities for history management
Welcome to the Cmdr project, written by Andreas Kupries.
For availability please read Cmdr - How To Get The Sources.
This package provides utility commands to manage a command history.
When invoked this command extends the actor instance (an officer) with the necessary commands (a history officer) and settings to record a history of commands entered for this actor and its subordinate commands, and allow the user to manage this history.
The result of the command is the empty string.
The officer to extend with history management commands.
After attachment the actor will accept the following 3 commands:
history list ?n? - Show last n history entries. Defaults to all. history clear - Drop all history entries history limit ?n? - Limit history to 'n' entries (n >= 0). Unlimited for n < 0.
Under most circumstances the attachment is handled through the method custom-setup of officers. See cmdr::officer, and the Example for more information.
When invoked this command sets the package-wide history save file used by the commands to the path.
The result of the command is the empty string.
When invoked this command sets the package-wide limit on history size to limit. A value less than zero means "no limit".
The result of the command is the empty string.
Below an example on how to activate history for an officer. The example was taken from the fx application extending the fossil DVCS.
cmdr history initial-limit 20 cmdr history save-to ~/.fx_history cmdr create fx::fx [file tail $::argv0] { custom-setup ::cmdr::history::attach [...] }
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