lharding / tasknc

ncurses wrapper around taskwarrior
MIT License
117 stars 18 forks source link

adding new task opens existing task instead of newly created task #41

Closed olafhering closed 5 years ago

olafhering commented 7 years ago

With tasknc b887688 creating a new task with 'a' opens an existing task in the editor, instead of opening the newly created task. One has leave the editor, scroll down in the list to 'new task' and edit it with 'e'.

lharding commented 7 years ago

Thank you for this - I haven't used the native 'add' feature in a bit and so didn't realize it was broken. Until I get around to fixing this (or someone opens a PR), here's what I've been doing instead:

In ~/.config/tasknc/config:

unbind tasklist a
  bind tasklist  a  shell ~/.config/tasknc/promptadd

Content of ~/.config/tasknc/promptadd:

#!/bin/bash

clear
read -e desc
task add "$desc"

I prefer this method because it doesn't require a roundtrip through an editor just to add a task. In general extension and configuration via scripting over inbuilt functionality is my roadmap for tasknc.