Commit graph

280 commits

Author SHA1 Message Date
John Wiegley
71258f1fe9 Fixed a problem that was causing -l EXPR to trigger on assertion. 2009-02-07 04:55:42 -04:00
John Wiegley
011f35b730 Implemented expr_context. 2009-02-07 04:27:28 -04:00
John Wiegley
19694cf2a2 Use seekg, in place of multiple ungets. 2009-02-07 04:27:14 -04:00
John Wiegley
682544ef17 Refer to empty expression operators as simply NULL. 2009-02-07 04:27:04 -04:00
John Wiegley
eb98e0da8b More revision to the way options are handled; reworked CSV command. 2009-02-07 04:26:30 -04:00
John Wiegley
17c7037da9 Correction to debug output. 2009-02-07 00:08:08 -04:00
John Wiegley
47725095da Allow regular expressions to be "printed". 2009-02-07 00:04:43 -04:00
John Wiegley
72b04f69e5 Corrected parsing of ) in command arg predicate expressions. 2009-02-07 00:04:33 -04:00
John Wiegley
e5befb0102 Fixed the debug output of the pre-command "args". 2009-02-07 00:04:19 -04:00
John Wiegley
e8d2409430 Removed --reconcile and --reconcile-date. 2009-02-07 00:03:58 -04:00
John Wiegley
1b9e7fa7be When in the REPL, consider each new command a new "command-line". 2009-02-06 23:39:04 -04:00
John Wiegley
fdc8e401bf Don't push and pop reports unless at a REPL. 2009-02-06 23:38:51 -04:00
John Wiegley
234304e3a3 Added some stub options, for --help and friends. 2009-02-06 23:38:37 -04:00
John Wiegley
c1bf4bdf69 Moved the --abbrev-len option to report_t. 2009-02-06 23:38:12 -04:00
John Wiegley
aea84dd9c5 Added two comments, to remind myself to check something. 2009-02-06 23:37:25 -04:00
John Wiegley
cdcd52dbaf Removed the nearly unknown --descend and --descend-if options. 2009-02-06 23:36:32 -04:00
John Wiegley
909f7b1aa3 Fixed a command-line parsing bug with "account not account". 2009-02-06 23:19:24 -04:00
John Wiegley
8c3369b8ab Fixed the use of --effective when an entry has no especial effective date. 2009-02-06 22:20:56 -04:00
John Wiegley
0bd232bb23 Corrected a mispelled #define. 2009-02-06 14:12:10 -04:00
John Wiegley
54d5d8ada4 Removed the now unused pushvar.h file. 2009-02-06 13:45:26 -04:00
John Wiegley
cf6babcf90 Restored all the option handlers from 2.6.2, but not the options themselves. 2009-02-06 03:31:41 -04:00
John Wiegley
ecc5a1aab5 Whitespace fix. 2009-02-06 03:30:53 -04:00
John Wiegley
a085f8e9ad Only initialize the amount_t module if it hasn't been already. 2009-02-06 03:30:45 -04:00
John Wiegley
d853a58f5f Moved --pager handler back into report_t. 2009-02-05 21:54:46 -04:00
John Wiegley
408b819c6e Greatly simplified the way option and command handlers are defined. 2009-02-05 21:20:09 -04:00
John Wiegley
7b24e8f8e3 Moved some files around. 2009-02-05 21:18:25 -04:00
John Wiegley
edb9cff4a2 Moved work.cc and global_scope_t into a new global.cc file. 2009-02-05 04:20:49 -04:00
John Wiegley
0e2a3a9c00 Moved much of the main.cc code into a new global_scope_t class. 2009-02-05 04:06:58 -04:00
John Wiegley
37006741d6 Support using Ledger as a script interpretor.
The file must begin with '#!/usr/bin/env ledger --script'.  You can add a -f
option to the options, but it must come before --script.
2009-02-05 03:49:49 -04:00
John Wiegley
327fdca8f4 Display value booleans as 0 and 1. 2009-02-05 03:49:14 -04:00
John Wiegley
d029990209 Create bound scopes for locating the total expr. 2009-02-05 02:45:29 -04:00
John Wiegley
4854cead4f When recompiled an expr_t, forget old definitions. 2009-02-05 02:45:29 -04:00
John Wiegley
b7632e7475 Removed an unnused member. 2009-02-05 02:45:29 -04:00
John Wiegley
c58cd88299 Reworked how the REPL is handled. 2009-02-05 02:45:26 -04:00
John Wiegley
4f174014b9 When copying an expr_t object, don't copy the compiled state. 2009-02-05 02:45:26 -04:00
John Wiegley
de816e8307 Whitespace fix. 2009-02-05 02:45:24 -04:00
John Wiegley
db52ad86d5 Don't give an error if the init file cannot be found. 2009-02-05 02:16:43 -04:00
John Wiegley
3f960be96c Removed all references to the old binary cache. 2009-02-04 20:57:14 -04:00
John Wiegley
f8ba4165fe Clear the master account totals after a report is done. 2009-02-04 20:46:56 -04:00
John Wiegley
7d628d88ff Moved the --pager option to the session object, rather than the report object. 2009-02-04 20:46:45 -04:00
John Wiegley
863b5d8144 Added proper handling of SIGINT (C-c) and SIGPIPE (pager quits). 2009-02-04 20:46:08 -04:00
John Wiegley
04ac5ffcb4 Whitespace fix. 2009-02-04 20:45:43 -04:00
John Wiegley
796feb2634 Added code to quit more gracefully. Ctrl-C still needs work. 2009-02-04 20:11:27 -04:00
John Wiegley
ea1e898eec Minor fixes to the REPL when using libedit. 2009-02-04 19:58:56 -04:00
John Wiegley
2d941730b1 Largely removed all of Ledger's use of global variables, for the REPL's sake. 2009-02-04 19:55:27 -04:00
John Wiegley
73cf3b01fb Added structural support in main() for using a REPL. 2009-02-04 19:55:08 -04:00
John Wiegley
b9603a1512 Moved ptristream into its own file. 2009-02-04 03:54:29 -04:00
John Wiegley
1cc33531ea Simplified the textual parser, and improved metadata support. 2009-02-04 03:34:37 -04:00
John Wiegley
28da097fc2 Several improvement to transaction parsing. 2009-02-04 00:52:52 -04:00
John Wiegley
24ef163ba5 Removed unneeded member variables. 2009-02-04 00:35:02 -04:00