diff options
author | John Ankarström <john@ankarstrom.se> | 2021-05-27 04:12:50 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-05-27 04:12:50 +0200 |
commit | b05762b6afcc16894f667d775451c08da34d790b (patch) | |
tree | b52309cfcc6307da9a38ac7c47a78a85fecf33fc | |
parent | efc6d9d36168a18a134a079c0321a66e2ef375ab (diff) | |
download | mum-b05762b6afcc16894f667d775451c08da34d790b.tar.gz |
mum: Add 's' command (sync and read new messages)
-rwxr-xr-x | src/m-sync | 2 | ||||
-rwxr-xr-x | src/mum | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -5,7 +5,7 @@ # Edit this script to your own preferences. USERNAME=john@ankarstrom.se -PASSWORD=`getpw` +[ -z "$PASSWORD" ] && PASSWORD=`getpw` export USERNAME PASSWORD mkfifo mbox.i.fifo @@ -182,6 +182,13 @@ h: load($+{index} || $INDEX); } + # s -- sync and read messages + elsif (/^s\Z/x) { + chomp($ENV{PASSWORD} = `getpw`) if not $ENV{PASSWORD}; + system 'm-sync'; + load($INDEX) if $INDEX; + } + # range without command elsif (/^(?&range) \Z $d/x) { # select last message in range |