Commit graph

157 commits

Author SHA1 Message Date
Paul Beckingham
7faad5fb44 Command Line Defaults
- Implemented support for rc.default.command.
- Implemented support for assumed info command.
- Implemented Arguments::inject_defaults to insert default arguments
  at just the right location.
- Corrected CmdCustom handling of limit:page.
2011-06-26 01:21:11 -04:00
Paul Beckingham
91e5a5e02e Commands - info
- When no command is specified, assume 'info' command.
2011-06-26 00:43:18 -04:00
Paul Beckingham
42ead6b34d Report Filters
- Report filters are now properly loaded and injected into the argument
  list.
2011-06-25 21:56:57 -04:00
Paul Beckingham
b58438bdd4 Regexes
- Added regex support to substirutions.
- Fixed bug that prevented 1.9.4 from shipping with regexes.  If the
  description is "aXXaaXXa", and the substitution is /XX/.../ then the
  first substitutions changes the length of the string to "a...aaXXa"
  and therefore invalidates the index for the second match, and makes
  this change: "a...a...Xa".  The fix is to keep a running 'skew' count
  of the difference in 'from' and 'to' length, to adjust the match
  indexes.
- Moved the helper deltaSubstitutions function into the Task object,
  which makes more sense.
- Cleaned up output composition for CmdAdd.
- Eliminated #ifdef FEATURE_REGEX.  They are here to stay.
2011-06-25 16:41:17 -04:00
Paul Beckingham
622e9c5e1e Burndown
- Corrected label placement.
2011-06-25 14:50:39 -04:00
Paul Beckingham
20bb5bf648 I18N
- Localized more commands.
2011-06-25 13:14:47 -04:00
Paul Beckingham
6d4bf3dc75 I18N
- Localized 'ids', '_ids' and '_zshids' commands.
2011-06-25 12:01:12 -04:00
Paul Beckingham
5972272de2 I18N
- Missed a string in CmdAdd.
2011-06-25 11:54:47 -04:00
Paul Beckingham
b70fa61f34 Limits
- Implemented built-in support for limits.
2011-06-25 11:53:35 -04:00
Paul Beckingham
9603864924 Commands - add, log
- Implemented add and log commands using new infrastructure.
- Relaxed restriction about creating completed tasks with no dependencies.
- Localized CmdAdd.cpp CmdLog.cpp.
- Implemented Command::modify_task to apply command line arguments to a
  specified task.
- Implemented Command::apply_defaults to apply various initial values to
  a specified task, such as entry date.
2011-06-24 00:58:26 -04:00
Paul Beckingham
a7d6b91ad3 Cleanup
- Renamed RegX to RX.  Got sick of the RegX name - looked too much like GenX.
2011-06-21 18:15:58 -04:00
Paul Beckingham
b63835757f I18N
- Localized more files.
2011-06-21 18:05:17 -04:00
Paul Beckingham
b49523c06d Regex
- Implemented RegX class to maintain a separate compile, and match
  method, thereby allowing efficient re-use of the regex.  This is
  critical to Expression::eval, where an identical regex might be
  applied to every task.
- Obsoleted rx.{h,cpp}, which combined the compile and match steps
  into a single call, and is therefore not efficient when used in
  the context of filtering.
- Fixed some unit tests that weren't building.  Now they do.  They
  don't work of course (don't be silly) but that's a problem for
  another day.
- Modified all code that relies on rx.h to use RegX.h.
2011-06-21 01:43:57 -04:00
Paul Beckingham
aa8d872466 Expressions
- Implemented !~ operator.
- Hid debug output for now.
2011-06-19 23:50:05 -04:00
Paul Beckingham
7762ee2f9e Commands
- Promoted filtering code to the Command base class.
- Added filtering short-circuit.
2011-06-19 10:25:53 -04:00
Paul Beckingham
c77c6f172f Expressions
- Many operators implemented
- DOM::get partially implemented
2011-06-17 01:00:03 -04:00
Paul Beckingham
6a48d86f2c L10N
- Localized all column objects, some commands.
2011-06-16 20:28:46 -04:00
Paul Beckingham
f971fcd110 Code Cleanup
- Obsoleted Filter.{h,cpp}.
- Obsoleted Sequence.{h,cpp}.
- Eliminated Context::autoFilter.
- Stubbed Expression::eval.
2011-06-15 23:45:50 -04:00
Paul Beckingham
6242c4a8ae Bug #788
- Fixed bug #788, which reported regex and readline versions, even though they
  are not used.
2011-06-14 21:27:28 -04:00
Paul Beckingham
087cf7e5ed Feature #479
- Added filtering to the calendar command.
2011-06-13 23:03:50 -04:00
Paul Beckingham
ded55c360b Export - query
- Output from the query command is now optionally surrounded by [ ... ]
  to make this a syntactically correct JSON document.  This is off by
  default.
- Updated documents.
2011-06-13 18:11:44 -04:00
Paul Beckingham
5d2528bff6 Command: tip
- Removed (stubbed) 'tip' command from core.  Will be external, if
  and when it is developed.
2011-06-13 00:49:37 -04:00
Paul Beckingham
c8d9a2a268 Expressions
- Support and documentation for rc.patterns, which enables/disables
  support for /pattern/ command line arguments.
- Support and documentation for rc.expressions, which enables/disables
  support for command line expressions.
- Now canonicalizes attribute names.
- Now canonicalizes modifier names.
- New colorization (temporary) that colors all Arguments::dump output
  green when processed.
- New distinction between 'old' and 'new' style command lines.  Old style
  is "pro:A +foo pri.not:M" with implicit "and" operators.  New style
  includes operators but does not include "+foo" and "/foo/".
- Many tokens are converted directly to primitive types (int, number,
  string) when no further processing is required.
- Restored CmdShow to functionality, and linearized the list of supported
  configuration variables, for easier insertion.
- Modified arguments.t.cpp unit tests.
2011-06-12 09:17:50 -04:00
Paul Beckingham
63e6c08fdd Expressions
- Re-enabled read-only commands that were broken because expressions
  were not implemented.  Currently they don't work, but the mechanism
  is in place.
2011-06-11 14:30:19 -04:00
Paul Beckingham
f8d9338102 Expressions
- Added list of non-word characters to assist is_attr.
2011-06-10 00:17:52 -04:00
Paul Beckingham
199bb85d88 Expressions
- Improved strictness of attr and attmod detection, although it needs
  more.
- Added unit tests arguments.t.cpp, to test the detection methods.
2011-06-08 00:16:19 -04:00
Paul Beckingham
7c910e46be Code Cleanup
- Just found out about std::vector::back, after all these years.
2011-06-07 00:48:00 -04:00
Paul Beckingham
ed8454c202 Expressions
- Implemented sequence --> infix converter.
- Added new Lexer code.
- Added Lexer unit tests.
2011-06-06 01:46:11 -04:00
Paul Beckingham
86dcec8aea Expressions
- Began Expression::toInfix to upgrade old-style filters to infix
  algebraic filters.
- Added operator support to Arguments::categorize.
- Modified CmdCustom.cpp as a read-only command guinea-pig for the
  new argument processing.
2011-06-05 13:47:52 -04:00
Paul Beckingham
68a749ee16 Argument Parsing
- Implemented Arguments::extract_read_only_filter to isolate the
  arguments that pertain to read-only command filters
- Implemented Arguments::extract_write_filter to isolate the arguments
  that pertain to write command filters.
- Implemented Arguments::extract_modifications to isolate the arguments
  that pertain to write command modifications.
- Created stubbed Expression object.
- Began integration of Expression and Arguments into commands/CmdCustom.
2011-06-05 02:09:25 -04:00
Paul Beckingham
61e549c80c Code Cleanup
- Removed many more uses of the 'foreach' macro.
2011-06-04 23:02:18 -04:00
Paul Beckingham
f9c1820740 Argument Parsing
- Added proper handling for sequences, in that they must be contiguous.
- Added placeholder code for default command, and automatic info report.
- Eliminated Context::parse.
- Eliminated Context::run Timer, because when it goes out of scope, it
  adds timing messages to the deubg output, which at the end of Context::run
  has already been displayed.  In addition, the Context::dispatch timer
  is about 0.2 milliseconds shorter, so the two are redundant.
2011-06-04 18:42:33 -04:00
Paul Beckingham
58a677ffb5 Argument Parsing
- Eliminated stored arg_overrides and file_override in Context.
- Removed Filter, Subst, Task, Sequence from Context.
- Remove shadow file support.  Hallelujah.
- Disabled/commented out most commands, ready for the big transition
  to the new parsing style.
- Obsoleted Subst.{h,cpp}.
2011-06-04 15:11:34 -04:00
Paul Beckingham
644d027a87 Argument Parsing
- Obsoleted Command::exectute  'commandLine' argument.  It is worse
  than unnecessary, it is an uncategorized raw argument string, which
  is only really useful for the 'execute' command, which itself now
  calls Arguments::combine to reconstruct the command line string.
2011-06-04 12:33:58 -04:00
Paul Beckingham
5732833da2 Build
- Converted more atoi to strtol calls.
2011-06-02 23:20:15 -04:00
Paul Beckingham
223c7b3c56 Build
- Fixed case-sensitive include file name.
2011-06-02 23:16:52 -04:00
Paul Beckingham
617e0ebe54 Build
- Migrated atoi to strtol, and added missing include.
2011-06-02 23:14:34 -04:00
Paul Beckingham
fa36931064 Bug
- Fixed bug that showed the 'due' date, under the heading 'until' date, in the
  info report (thanks to Michael McCann).
2011-06-02 21:39:50 -04:00
Paul Beckingham
e19f087931 Refactor
- Prepared CmdCustom for new command line processing code.
2011-06-02 00:47:05 -04:00
Paul Beckingham
a3912d9123 Refactoring
- Obsoleted Cmd object.
- Removed Context::dispatch, renamed dispatch2 --> dispatch.
- Commented out import and custom report functionality that depends
  on Cmd.  This should be about as broken as taskwarrior gets.  It's
  all uphill from here.
2011-06-02 00:17:16 -04:00
Paul Beckingham
5d9fb1fff9 Help
- Modified command usage help output.
2011-05-31 00:43:26 -04:00
Paul Beckingham
a2da93b681 Commands - modify
- Migrated handleModify to CmdModify.
2011-05-30 15:48:20 -04:00
Paul Beckingham
510ce650a6 Commands - merge
- Migrated handleMerge to CmdMerge.
2011-05-30 14:45:39 -04:00
Paul Beckingham
af90a14cb5 Commands - push
- Migrated handlePush to CmdPush.
2011-05-30 14:37:39 -04:00
Paul Beckingham
99fae1f9a8 Command - pull
- Migrated handlePull to CmdPull.
2011-05-30 14:30:14 -04:00
Paul Beckingham
abd51e81a3 Commands - delete
- Migrated handleDelete to CmdDelete.
2011-05-30 14:00:34 -04:00
Paul Beckingham
908fbd8ca4 Commands - done
- Migrated handleDone to CmdDone.
2011-05-30 13:53:57 -04:00
Paul Beckingham
75a24f5113 Commands - timesheet
- Migrated handleReportTimesheet to CmdTimesheet.
2011-05-30 13:46:08 -04:00
Paul Beckingham
2fb743992f Command - undo
- Migrated handleUndo to CmdUndo.
2011-05-30 13:38:45 -04:00
Paul Beckingham
4c47748dd7 Commands - calendar
- Migrated handleReportCalendar to CmdCalendar.
2011-05-30 13:30:18 -04:00