use TAB as pattern separator in repline

This commit is contained in:
Yargo iMac 2019-12-18 16:46:22 +01:00
parent ac98a12443
commit 639a93f179
2 changed files with 6 additions and 2 deletions

View File

@ -70,6 +70,9 @@ Cards/items do not have any kind of ID number; they are just text, and
therefore some strange things may happen if the same entry exists in
more than one "kanban file" -- in particular, they will all change
status (doing/waiting/done) together.
No card may contain TAB characters; they are replaced by SPC at entry.
Do not add TAB charactes manually through the `ek` command, as this
will probably disturb the script's manipulation of such cards.
The `d` command will not only display items with a preceding `*`
but also those with a pattern of `(MM-DD)` anywhere after preceding

View File

@ -145,7 +145,7 @@ repline(){
newl="$*"
for ff in $kbs
do cat <<EOC | ed "$ff" >/dev/null 2>&1
%g/$patt/c\\
%g $patt c\\
$newl\\
.
w
@ -233,7 +233,8 @@ n) newc=`echo "$coa1 $coa2 $coa3 $coar" | sed -e 's/ *$//'`
else echo adding card for target $currkan
fi
if test "$newc" != ""
then echo '-' "$newc" >>$currkan
# replace all tabs by spaces (otherwise issue with ed pattern in repline)
then echo '-' "$newc" | sed -e 's/ / /g' >>$currkan
else echo no content found, nothing added
fi
showall doing