summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/openfile2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/openfile b/bin/openfile
index cf3c6c3..5a250dc 100755
--- a/bin/openfile
+++ b/bin/openfile
@@ -5,6 +5,6 @@ tempdir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard/files"
file="$tempdir/$(basename "$1")"
[ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid -f xdg-open"
mkdir -p "$tempdir"
-cp -f "$1" "$file"
+ln "$1" "$file"
$opener "$file" >/dev/null 2>&1
find "${tempdir:?}" -mtime +1 -type f -delete