Commit Graph

201 Commits

Author SHA1 Message Date
Tomas Babej
830a8c6ec8 CLI2: Display filter footnote only if some filter token is present 2015-10-03 09:15:15 -04:00
Paul Beckingham
d5002ab400 Bug: The 'filter' verbosity token code was missing
- Probbably cut out during the CLI --> CLI2 cutover.
2015-09-19 15:22:03 -04:00
Paul Beckingham
11009fd3ff CLI2: Multiple 'limit:N' args are now properly handled
- The 'next' report has 'limit:page' in the filter, and when an additional arg
  was specified, only the first was obeyed. This means that it could not be
  effectively overriden.
2015-09-15 17:02:59 -04:00
Paul Beckingham
360071712f CLI2: Removed references to PSEUDO args, now they are demoted to config settings 2015-09-12 09:20:31 -04:00
Paul Beckingham
84b3055690 CLI2: Pseudo-args demoted to config settings
- When 'limit:N' is encountered, it is removed from the command line, and
  added as a config setting, equivalent to 'rc.limit:N'.
- This simplifieѕ subsequent command line parsing.
2015-09-12 09:03:15 -04:00
Paul Beckingham
c59afe34c4 TW-1656: Implicitly parenthesize argv filter
- Thanks to Daniel Shahaf.
2015-09-12 08:57:38 -04:00
Paul Beckingham
2bdaa37e32 CLI2: Removed unnecessary processing of filter 2015-09-11 08:44:39 -04:00
Paul Beckingham
442ef6a29b CLI2: Combined two conditions 2015-09-11 08:43:55 -04:00
Paul Beckingham
3b4dc9acb3 CLI2: Removed unused arg
- Thanks to Tomas Babej.
2015-09-07 12:44:41 -04:00
Tomas Babej
d210c6d07f debug: Display parser trees at level 2, eval output at 3 2015-09-07 12:22:35 -04:00
Paul Beckingham
e4132f6a02 CLI2: Expand DOM references in single-token values 2015-09-07 11:49:55 -04:00
Paul Beckingham
d60a2f9954 CLI2: Properly categorize FILTER, MODIFICATION, MISCELLANEOUS
- Now that CLI2::categorizeArgs is complete, all that remains is to make sure
  the individual commands comply.
2015-09-06 14:53:46 -04:00
Paul Beckingham
826d00d33f CLI2: Can now detect unwanted args in ::categorizeArgs 2015-09-06 01:56:59 -04:00
Paul Beckingham
3897c23c8d CLI2: Prevent loops
- Context was sometimes causing looping:

    ::analyze -> ::addContexFilter -> ::addFilter -> ::analyze

  This is prevented by a simple latch.
2015-09-06 01:42:30 -04:00
Paul Beckingham
7da3f3b2ba CLI2: Moved arg categorization earlier in the processing
- Moving categorization (FILTER, MODIFICATION, MISCELLANEOUS) int ::analyze,
  instead of waiting until ::prepareFilter means that all commands now have
  access to categorized args. This means there is no need to repeatedly scan
  and skip over 'rc:' etc.
2015-09-06 01:02:06 -04:00
Paul Beckingham
5ae32dd036 CLI2: 'info' was tagged 'DEFAULT' and should have been 'ASSUMED' 2015-09-06 00:13:44 -04:00
Paul Beckingham
9b786de5be CLI2: Clarified intent for demotion 2015-09-04 17:14:50 -04:00
Paul Beckingham
a82927cb54 CLI2: Refactored some of ::prepareFilter into ::categorizeArgs 2015-09-04 17:14:50 -04:00
Paul Beckingham
3f4daeacf0 TW-1670: Reversed ranges are parsed as a mathematician would expect
- Thanks to Daniel Shahaf.
2015-08-27 23:22:28 -04:00
Paul Beckingham
274d3dddd0 CLI2: Simplified logic for separating FILTER, MODIFICATION, MISCELLANEOUS args 2015-08-23 09:44:02 -04:00
Paul Beckingham
62a66bad9c CLI2: Corrected detection of MISCELLANEOUS args 2015-08-22 13:31:55 -04:00
Paul Beckingham
018592abac CLI2: Colored diagnostics for MISCELLANEOUS args 2015-08-22 11:03:08 -04:00
Paul Beckingham
257edc535a CLI2: Eliminated READCMD/WRITECMD tags
- Now tags command with DNA.
2015-08-22 08:29:23 -04:00
Paul Beckingham
358e0cc62d Modifiers: "is" and "isnt" are now exact/inexact operators 2015-08-17 08:09:40 -04:00
Paul Beckingham
ffcc574c85 TW-1653: info report regression; shouldn't be context sensitive
- Thanks to David Patrick, Tomas Babej.
2015-08-12 21:39:04 -04:00
Paul Beckingham
38500fd90b TW-1652: task rm misparsed
- Thanks to Daniel Shahaf.
2015-08-07 19:33:27 -04:00
Paul Beckingham
6f294e2968 Debug: rc.sugar enables ID/UUID snytactic sugar
- This is not documented.  It is not for users.
2015-08-07 11:35:27 -04:00
Paul Beckingham
f9b5513882 Cleanup: Formatting code 2015-08-05 16:50:20 -04:00
Paul Beckingham
036eb6b010 TW-1647: descriptions that are stringified ids
- Thanks to Daniel Shahaf.
2015-08-04 23:40:27 -04:00
Paul Beckingham
0c85725a4c CLI2: Plain arg detection was failing if the arg was the last arg 2015-08-02 11:17:05 -04:00
Paul Beckingham
941e8c9f37 CLI2: When applying extra filters, insert at the beginning, thus avoiding '--' 2015-08-02 10:20:12 -04:00
Paul Beckingham
1921ed77d5 CLI2: Removed command-specific logic in addContextFilter
- This is now driven by command DNA.
2015-08-02 10:14:15 -04:00
Paul Beckingham
758df84539 Context: Now obeys command DNA
- Applying a context filter is now performed only when a command requests it.
2015-08-02 10:08:04 -04:00
Paul Beckingham
caab26247c TW-1642: After "--", an apostrophe unexpectedly ends the task description
- Thanks to Jeremy John Reeder.
2015-07-28 19:58:18 -04:00
Paul Beckingham
f2ecb61edf CLI2: PSEUDO args are no longer candidates for search terms 2015-07-27 02:36:35 -04:00
Paul Beckingham
9c8edc4121 CLI2: ::desugarFilterPlainArgs now needs to look for Lexer::Type::identifier 2015-07-27 02:18:36 -04:00
Paul Beckingham
16620bed45 CLI2: Demoting Lexer::Type::dom args that fail to canonicalize no longer makes sense 2015-07-27 02:13:43 -04:00
Paul Beckingham
7354a8f13f CLI2: Context not applied for certain commands and args
- The 'undo', 'export' and all helper commands are exempt from context
  filtering.
- Any command line containing a FILTER with Lexer:Type::set or Lexer::Type:uuid
  is also exempt from context filtering.
2015-07-25 17:23:06 -04:00
Paul Beckingham
6c31098ad2 CLI2: Context no longer applies to any helper command. 2015-07-25 01:01:24 -04:00
Paul Beckingham
24bb606a52 TW‐1566: Context is applied on 'task export'
- Thanks to Tomas Babej.
2015-07-23 07:25:35 -04:00
Paul Beckingham
ba155aead3 TW-1638 Undo doesn't work when a context is set
- Thanks to Jeremy John Reeder.
2015-07-22 11:37:10 -04:00
Paul Beckingham
7ee8ad4e44 TW-1634: due.not:<date> excludes only tasks scheduled at mitnight
- Thanks to Tomas Babej.
2015-07-19 14:48:35 -04:00
Paul Beckingham
251eedf7e5 CLI2: Dead code removal 2015-07-17 15:35:11 -04:00
Paul Beckingham
6aaa7c5074 CLI2: Some plain args were not spotted
- A plain arg can be Lexer::Type::word or Lexer::Type::dom.
2015-07-16 16:07:41 -04:00
Paul Beckingham
b92802c2fb Entities: There is no spoon^H^H^H^H^Huda entity
- The code was trying to canonicalize 'attribute' and 'uda' separately,
  but there are no 'uda' entities.
2015-07-15 19:40:13 -04:00
Paul Beckingham
cf816be717 CLI2: Removed incorrect comment 2015-07-13 16:46:07 -04:00
Paul Beckingham
a7eb32272c TW-1419: On add '-tag' is considered a tag removal, which makes no sense. 2015-07-13 14:24:24 -04:00
Paul Beckingham
a09a2bc241 CLI2: Added conditional expression eval
- Only non-'string' type attributes ('numeric', 'date', 'duration') support the
  evaluation of values in FILTER arguments, for example:
    due.before:now+1d
  If evaluation is supported, values need to be lexed into tokens, and if there
  are multiple tokens, parenthesize the set.
2015-07-13 01:09:11 -04:00
Paul Beckingham
9f2efa67c2 CLI2: Reduced verbosity of debug output 2015-07-13 00:22:19 -04:00
Paul Beckingham
d2f5937344 CLI2: Fixed bug that allowed numbers to be interpreted as IDs
- For a WRITECMD with no FILTER args, if a Lexer::Type::number exists as a
  MODIFICATION, and that number is an unsigned integer, then promote it to
  an ID. Added eceptions for the 'add' and 'log' command.

  This feature allows for the continued use of 'task done 1', which should
  be deprecated.
2015-07-12 23:32:26 -04:00