GothenburgBitFactory / taskwarrior

Taskwarrior - Command line Task Management
https://taskwarrior.org
MIT License
4.15k stars 282 forks source link

Report named 'tasks' breaks all subcommands #2015

Open lilyball opened 6 years ago

lilyball commented 6 years ago

If my .taskrc defines a report named tasks this completely breaks all subcommands and causes any arguments to task to be interpreted as a filter. This is very bizarre.

For context, I used to use taskwarrior years ago, and I had a .taskrc set up that, among other things, included the following definition:

report.tasks.description=List all pending tasks by age
report.tasks.columns=id,project,priority,entry.age,start.age,due.countdown,depends,issue,issuepriority,tags,description
report.tasks.filter=status:pending
report.tasks.labels=ID,Proj,Pri,Age,Sta,Due,Deps,Issue,Pri,Tags,Description
report.tasks.sort=entry+

With this in place, task with no arguments will ignore the default command and print all tasks, and any arguments are just interpreted as a filter on that. So for example task help just shows me all tasks whose description or notes includes the word "help" somewhere.

task diag

With the above report intact, task diag just tells me "No matches", but after commenting out that report I get the following:

task 2.5.1
   Platform: Darwin

Compiler
    Version: 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)
       Caps: +stdc +stdc_hosted +LP64 +c8 +i32 +l64 +vp64 +time_t64
 Compliance: C++11

Build Features
      Built: Oct 10 2017 23:38:24
      CMake: 3.9.4
    libuuid: libuuid + uuid_unparse_lower
  libgnutls: 3.5.15
 Build type: Release

Configuration
       File: /Users/kevin/.taskrc (found), 3389 bytes, mode 100644
       Data: /Users/kevin/Dropbox/.task (found), dir, mode 40755
    Locking: Enabled
         GC: Enabled
  rc.editor: vim
     Server: 
      Trust: strict
Certificate: , not readable, 0 bytes
        Key: , not readable, 0 bytes
    Ciphers: NORMAL
      Creds: 

Hooks
     System: Enabled
   Location: /Users/kevin/Dropbox/.task/hooks
             (-none-)

Tests
      $TERM: xterm-256color (120x25)
       Dups: Scanned 446 tasks for duplicate UUIDs:
             No duplicates found
 Broken ref: Scanned 446 tasks for broken references:
             No broken references found
pbeckingham commented 6 years ago

Good catch. Will fix.

tbabej commented 3 years ago

Reproduced on 2.6.0.

$ task projects
No matches.
$ task help
No matches.