summaryrefslogtreecommitdiff
path: root/src/precmd.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add support for --hashes=sha512_256 as another algorithmJohn Wiegley2024-08-051-1/+1
|
* Add support for hash chaining to detect modifications in postingsJohn Wiegley2024-08-051-1/+1
| | | | | | | | | | | | | | | | | | | The following details of a posting contribute to its hash: fullname of account string representation of amount Each posting hashes contributes to the transaction hash, which is compromised of: previous transaction’s hash (as encountered in parsing order) actual date optional auxiliary date optional code payee hashes of all postings Note that this means that changes in the “code” or any of the comments
* Update copyright yearAlexis Hildebrandt2023-02-021-1/+1
| | | | [skip ci]
* Update copyright statement for 2022Alexis Hildebrandt2022-07-021-1/+1
|
* [misc] Update year in copyright notice to 2017Alexis Hildebrandt2018-01-271-1/+1
| | | | [ci skip]
* [misc] Update year in copyright notice to 2017Alexis Hildebrandt2017-01-051-1/+1
| | | | [ci skip]
* [misc] Update year in copyright notice to 2016Alexis Hildebrandt2016-01-021-1/+1
| | | | [ci skip]
* Bump copyright notice to 2015Alexis Hildebrandt2014-12-271-1/+1
| | | | | | The following script makes it a no-brainer: % NEXT_YEAR=2015; ag -l 'Copyright.*Wiegley' \ | xargs sed -i '' -e "s/\(Copyright.*\)-20[0-9]\{2\}/\1-${NEXT_YEAR}/"
* Bump copyright information to 2014Alexis Hildebrandt2014-02-021-1/+1
|
* Bump copyright information to 2013John Wiegley2013-02-181-1/+1
|
* Made join_args() a global functionJohn Wiegley2012-03-131-16/+0
|
* Refactored the notion of "the current parsing context"John Wiegley2012-03-011-2/+8
|
* Increased file copyrights to 2012John Wiegley2012-02-291-1/+1
|
* Removed several unreached return statementsJohn Wiegley2012-02-171-9/+3
|
* Added report query modifiers: for, since, untilJohn Wiegley2010-06-221-6/+4
| | | | | | | | | Now instead of ledger reg expense -p "this month", you can say: ledger reg expense for this month And as a shorthand for "for until this month", you can just say "until this month" or "since this month".
* Added new "bold" modifier to query expressionsJohn Wiegley2010-06-221-10/+8
| | | | | | | | | | | | | | For example: ledger bal assets bold checking Or you can use expressions: ledger bal assets bold '=total > 1000' This last is identical to saying: ledger bal -l 'account =~ /assets/' --bold-if='total > 1000'
* query command's parsing behavior sensitive to -nJohn Wiegley2010-06-191-1/+2
| | | | | | | | | | With -n, the first argument is parsed as a string containing subarguments. Otherwise, each argument is parsed as a separate argument. In short, the -n mode mimicks what happens when the query expr after "=" is parsed for automated expressions. The non -n mode mimicks what happens at the command line for users.
* Revised how Ledger handles the "current year"John Wiegley2010-06-141-1/+1
| | | | | Now when the Y directive sets the current year for a region, it affects everything, as if the clock really were set back to that year.
* Moved join_args function to precmd.ccJohn Wiegley2010-06-131-0/+16
|
* Add support for typed metadataJohn Wiegley2010-06-121-0/+1
| | | | | | | | | | The metadata construct 'Key: Value' is now just a special case for 'Key:: "Value"'. Another after a :: in metadata setting is parsed as a full value expression and typed as such. For example: ; Key:: $400 + $500 ledger -l 'tag("Key") < $1000'
* Untabified all source filesJohn Wiegley2010-06-111-14/+14
|
* Updated copyrights to 2003-2010John Wiegley2010-03-051-1/+1
|
* Renamed the "args" command to "query"John Wiegley2010-03-041-1/+1
|
* It's OK for a report query to be emptyJohn Wiegley2009-11-181-14/+10
| | | | It's always possible the user only specified a display predicate.
* The new period parser is passing all testsJohn Wiegley2009-11-181-1/+1
|
* The new period parser is implemented, but untestedJohn Wiegley2009-11-181-49/+4
|
* Renamed date_interval_t::end to finishJohn Wiegley2009-11-171-4/+4
|
* Redesigned the format_t classJohn Wiegley2009-11-091-1/+1
|
* Redesigned the expr_t, predicate_t, query_t classesJohn Wiegley2009-11-091-11/+11
|
* 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
|