Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/ii-answer
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-02-19 14:26:06 +0100
committerErich Eckner <git@eckner.net>2021-02-19 14:26:06 +0100
commit1383d1ebd204a854e28e34b3ff54b26730c4dbdf (patch)
tree1055708288910e2d4eff4e9ebcca82e4441da74f /bin/ii-answer
parent766546736f961d1bf12fc74a65584f1c75ebb1f6 (diff)
bin/ii-answer: ignore "?" at end
Diffstat (limited to 'bin/ii-answer')
-rwxr-xr-xbin/ii-answer4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/ii-answer b/bin/ii-answer
index ed333cb..432fc6e 100755
--- a/bin/ii-answer
+++ b/bin/ii-answer
@@ -42,10 +42,10 @@ find "${irc_dir}" \
sloppy_salutation=''
fi
# answer "why don't you?"
- regex='^\S\+ <\(\S\+\)> '"${prefix}"'!\?why[- ]don'"'"'\?t[- ]you \(build\|stabilize\|unstage\|keep\|stubbornly_keep\) '
+ regex='^\S\+ <\(\S\+\)> '"${prefix}"'!\?why[- ]don'"'"'\?t[- ]you \(build\|stabilize\|unstage\|keep\|stubbornly_keep\) \([^?]*\)?\?$'
if grep -q "${regex}" "${out_file}"; then
sed -i '
- s/'"${regex}"'/\1 \2 /
+ s/'"${regex}"'/\1 \2 \3/
T
w /dev/stdout
d