summaryrefslogtreecommitdiff
path: root/src/precmd.cc
Commit message (Collapse)AuthorAgeFilesLines
* Moved xdata clearing code into each type properJohn Wiegley2009-11-051-1/+1
|
* Added error message if a predicate query is invalidJohn Wiegley2009-11-031-2/+9
|
* Extended xact example used by some pre-commandsJohn Wiegley2009-11-011-3/+7
|
* Fixed "show" keywords, and added // syntaxJohn Wiegley2009-10-281-9/+5
|
* Fixes to the new query expression parserJohn Wiegley2009-10-281-2/+5
|
* Rewrote the report query parserJohn Wiegley2009-10-281-2/+2
| | | | | | It is now a full parser that parses report queries directly into value expression trees. These then get rendered into text so that other options may extend the expression.
* The new code is working now.John Wiegley2009-03-161-1/+1
|
* First iteration of the new date_interval_t rewriteJohn Wiegley2009-03-151-12/+41
|
* Enabled use of pre-compiled headers by defaultJohn Wiegley2009-03-101-0/+2
|
* Reduced the #include dependency tree to a minimumJohn Wiegley2009-03-041-1/+5
|
* Added a "show" report query termJohn Wiegley2009-03-021-5/+18
| | | | | Everything beyond the show modifies the --display predicate, and everything before modifies the --limit predicate.
* Marked all strings needing internationalizationJohn Wiegley2009-02-251-17/+17
| | | | | | | | | | | | | | | | These strings are now collected automagically in the file po/ledger.pot. If you'd like to produce a translation, just run this command after building Ledger: msginit -l LOCALE -o LANG.po -i po/ledger.pot Where LOCALE is a string like de or en_GB, and LANG is a short descriptive word for your language. Then send me this .po file so I can commit it to the Ledger sources (alternatively, you could maintain the file in a fork on GitHub), and setup the build script to format and install your new message catalog during a "make install".
* The Great Renaming, Part IIJohn Wiegley2009-02-231-8/+8
| | | | | The last commit did not contain the majority of changes because of a slight mishap. This contains the real changeset.
* Create a new interactive_t helper classJohn Wiegley2009-02-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of this class is much like Emacs' (interactive) form: it allows a value expression function to declare exactly how many arguments, and of what type, it intends to receive. It then offers type-safe access to theese arguments in a consistent manner. An example value expression function definition in C++: value_t fn_foo(call_scope_t& scope) { // We expect a string, an integer, and an optional date interactive_t args(scope, "sl&d"); std::cout << "String = " << args.get<string>(0) << "Integer = " << args.get<long>(1) << std::endl; if (args.has(2)) // was a date provided? std::cout << "Date = " << args.get<date_t>(2) << std::endl; return NULL_VALUE; } There is also an in_context_t<T> template, which finds the context type T in the current scope hierarchy. The in_context_t then also acts as a smart pointer to reference this context object, in addition to serving the same duty as interactive_t. This combination of intent is solely for the sake of brevity. value_t fn_bar(call_scope_t& scope) { in_context_t<account_t> env(scope, "sl&d"); std::cout << "Account name = " << env->fullname() << "String arg = " << env.get<string>(0) << std::endl; return NULL_VALUE; } As you can see here, 'env' acts as a smart pointer to the required context, and an object to extract the typed arguments.
* Added a --strict session optionJohn Wiegley2009-02-191-1/+1
| | | | | | | When enabled, if any accounts or commodities are seen in an uncleared transaction, which were not seen previously in a cleared or pending transaction or a textual directive dealing with accounts or commodities, a warning is generated about the unknown item.
* Strip annotations from the "parse" resultJohn Wiegley2009-02-151-1/+1
| | | | This way the value shown follows the current reporting options.
* Greatly improved output from the "format" commandJohn Wiegley2009-02-131-21/+43
| | | | | It now shows the formatted result against a sample entry, similar to what "parse" now does.
* Wired up the "entry" command from 2.x, though it still needs to be ported.John Wiegley2009-02-101-19/+0
|
* Break libledger_data's dependency on session_t.John Wiegley2009-02-091-0/+1
|
* For the "parse" pre-command, provide a sample transaction context.John Wiegley2009-02-091-4/+26
|
* Join command-line arguments before handling pre-commands.John Wiegley2009-02-091-26/+29
|
* Repaired the output of the "eval" command.John Wiegley2009-02-081-9/+16
|
* Correction to debug output.John Wiegley2009-02-071-1/+2
|
* Fixed the debug output of the pre-command "args".John Wiegley2009-02-071-3/+2
|
* Restored all the option handlers from 2.6.2, but not the options themselves.John Wiegley2009-02-061-1/+1
|
* Largely removed all of Ledger's use of global variables, for the REPL's sake.John Wiegley2009-02-041-3/+4
|
* Removed the binary caching code, and the XML, QIF and Gnucash parsers.John Wiegley2009-02-031-3/+0
|
* Moved the pre-commands to their own file, and created new "args" command.John Wiegley2009-02-011-0/+167