diff options
author | Timon Reinold <tirei+aerc@agon.one> | 2024-07-16 16:25:41 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2024-07-16 22:40:11 +0200 |
commit | a604acceac0fec4c3ba7bcb1923dcef73453cd1f (patch) | |
tree | e6d6ee509dbda74ab2c8f84c5ef593bcaa578b4c /doc/aerc-jmap.5.scd | |
parent | d13823b8f63a6383ca7a61434f5e57dc37f62f94 (diff) | |
download | aerc-a604acceac0fec4c3ba7bcb1923dcef73453cd1f.tar.gz |
calendar: fix error with non-gnu awk
Use the POSIX-specified function Awk keyword instead of the non-standard
func to define the prepare function in the text/calendar filter.
The GNU Awk manual[1] mentions that gawk supports abbreviating function
to func, but recommends against using the func abbreviation, as POSIX
only specifies function.
On my system (Debian sid), gawk isn't installed and mawk (Debian
priority "required", i.e. installed by default) provides /usr/bin/awk
instead. mawk appears to not support the abbreviated func keyword. When
viewing a text/calendar part, I only see the following:
awk: /usr/libexec/aerc/filters/calendar: line 211: return outside function body
Using the standardized function keyword allows mawk to parse the prepare
function (including its return) and execute the script as intended.
[1]: https://www.gnu.org/software/gawk/manual/html_node/Definition-Syntax.html
(section 9.2.1 "Function Definition Syntax")
Fixes: 0db924dc14a3 ("filters: fix calendar filter parsing")
Changelog-fixed: Builtin `calendar` filter error with non-GNU Awk.
Signed-off-by: Timon Reinold <tirei+aerc@agon.one>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'doc/aerc-jmap.5.scd')
0 files changed, 0 insertions, 0 deletions