Browse Source

fix #730, sed only nl removal with error sup

tags/v3.3
Luke Smith 3 years ago
parent
commit
f92000e5ed
No known key found for this signature in database GPG Key ID: 4C50B54A911F6252
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      bin/mw

+ 1
- 3
bin/mw View File

@@ -172,10 +172,8 @@ delete() { if [ -z "${fulladdr+x}" ]; then
pass rm -f "$fulladdr" >/dev/null 2>&1
[ -n "${purge+x}" ] && rm -rf "${maildir:?}/${fulladdr:?}"

# Get rid of those multiple newlines because I don't know awk well enough to do it by default lol.
for file in "$msmtprc" "$mbsyncrc" "$mpoprc"; do
tr '\n' '|' 2>/dev/null < "$file" | sed "s/||\+/||/g" | tr '|' '\n' >> "$file"bu
mv -f "$file"bu "$file"
sed -ibu 'N;/^\n$/D;P;D;' "$file" 2>/dev/null; rm -f "$file"bu
done
}



Loading…
Cancel
Save