diff options
author | Florian Pritz <bluewind@xinu.at> | 2018-09-18 09:54:43 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2018-09-18 09:54:43 +0200 |
commit | 022f22e140977ad83d017a30744201f34089162a (patch) | |
tree | 5cb314ceb49160b1ec3f0478162f5b1d134d9eac | |
parent | 1378e31bad614bd153f385859773a5d40469d069 (diff) | |
download | bin-022f22e140977ad83d017a30744201f34089162a.tar.gz bin-022f22e140977ad83d017a30744201f34089162a.tar.xz |
mutt-open: Force /tmp; fix filename; force background
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | mutt-open | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -7,7 +7,8 @@ set -euo pipefail command=$1 file=$2 -tmpdir=$(mktemp -d 'mutt-open.XXXXXXXXX') -filename="${1##*/}" +tmpdir=$(mktemp -p /tmp -d 'mutt-open.XXXXXXXXX') +filename="${file##*/}" cp "$file" "$tmpdir/$filename" -systemd-cat "$command" "$tmpdir/$filename" +systemd-cat "$command" "$tmpdir/$filename" & +disown |