add immediate entry of new card

This commit is contained in:
Yargo 2019-12-11 11:39:32 +00:00
parent 3fb7509884
commit 96e46513e5
2 changed files with 13 additions and 5 deletions

View File

@ -48,6 +48,7 @@ then also the configuration can be displayed by entering `c`.
- `done` N : change card to "archive/done" status
- `wait` N : change card to "waiting/backlog" status
- `n` : add a new item/card to the target kanban (only one line of text)
content may be given on the same line, separated by whitespace
- `k` : define target kanban file (for direct edition, and new items)
- `ek` : directly edit the target kanban file with the text editor
- `ec` : directly edit the configuration file with the text editor
@ -238,4 +239,4 @@ We want to see the configuration, then quit:
---
_(2017-June YB)_
*2019-12-11/HB9KNS,Y.Bonetti*

View File

@ -1,6 +1,6 @@
#!/bin/sh
# clikan.sh -- CLI Kanban
ver='2017-06-22 Y.Bonetti'
ver='2019-12-11/HB9KNS'
conf="${CLIKANCONF:-$HOME/.clikanconf}"
defkanban="$HOME/clikanban.md"
@ -162,7 +162,8 @@ command keys:
q: quit
d/w/a: show 'doing/waiting(todo)/archive(done)' cards
k: select target kanban for entry of new cards
n: add new card to target kanban
n: add new card to target kanban, separated by whitespace
(e.g "n buy present!")
done N: archive card N as done
wait N: put card N back to waiting/todo state
do N: put card N into doing state
@ -205,10 +206,16 @@ k) echo "$kbs" | showselect
currkan=`getselect $currkan`
showall doing
;;
n) echo enter new card for target $currkan :
read newc
n) newc=`echo "$coa1 $coa2 $coa3 $coar" | sed -e 's/ *$//'`
if test "$newc" = ""
then
echo enter new card for target $currkan :
read newc
else echo adding card for target $currkan
fi
if test "$newc" != ""
then echo '-' "$newc" >>$currkan
else echo no content found, nothing added
fi
showall doing
;;