Created
February 1, 2018 13:56
-
-
Save ToxicFrog/0619365058f3a6e18bb6d7f341856a32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# initial setup to make sure we don't toast the user's real taskdir | |
export TASKRC=/tmp/$$.taskrc | |
cat >>"$TASKRC" <<EOF | |
data.location=/tmp/$$.taskdir | |
# Bug seems to be related to UDAs specifically; at least, I can't trigger it by editing description. | |
uda.author.label=Author | |
uda.author.type=string | |
# Add the UDA to the report output. | |
report.list.columns=id,uuid.short,author,description | |
report.list.labels=ID,UUID,Author,Description | |
EOF | |
# Initial task creation. Task one is where the magic happens. | |
\task add author:"Foo & Bar" "task one" | |
\task add author:Foo "task two" | |
\task list | |
echo '### BEFORE EDIT ###' | |
cat /tmp/$$.taskdir/pending.data | |
echo | |
# Replace that ' & ' in 'Foo & Bar' with a literal \ followed by a newline. | |
\task rc.editor="sed -E -i 's, & ,\\\\\\n,'" '(description ~ one)' edit | |
\task list | |
echo '### AFTER EDIT ###' | |
cat /tmp/$$.taskdir/pending.data | |
echo '### END PENDING.DATA ###' | |
# 2.5.1 here | |
\task --version |
Author
ToxicFrog
commented
Feb 1, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment