summaryrefslogtreecommitdiff
path: root/khal-list
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-01-29 22:06:35 +0100
committerErich Eckner <git@eckner.net>2020-01-29 22:06:35 +0100
commit72735fcea3aac239f314f61d95fe968f31f1f35c (patch)
tree24d680de98a51a42448d63d95b17bc86b2fd84ab /khal-list
parent34936dc2e48f8186f53fec46f4778eede988eb81 (diff)
downloadkhal-extras-72735fcea3aac239f314f61d95fe968f31f1f35c.tar.xz
khal-list: limit line count and length
Diffstat (limited to 'khal-list')
-rwxr-xr-xkhal-list12
1 files changed, 12 insertions, 0 deletions
diff --git a/khal-list b/khal-list
index 53ab733..d662ba2 100755
--- a/khal-list
+++ b/khal-list
@@ -13,4 +13,16 @@ script -qefc '/usr/bin/khal list '"$(
| sed '
s@\xe2\x9f\xb3@@g
s@\r$@@
+' \
+| tr -d '\r' \
+| sed '
+ :a
+ $!N
+ s/\([^}]\)\s*\n/\1 /
+ ta
+ P
+ D
+' \
+| sed '
+ s/\(\(^\|}\)[^{}]\{47\}\)[^{}]\+\${/\1...${/
'