diff options
Diffstat (limited to 'bin/openfile')
-rwxr-xr-x | bin/openfile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/openfile b/bin/openfile index e530b3e..f6668dc 100755 --- a/bin/openfile +++ b/bin/openfile @@ -1,6 +1,7 @@ #!/bin/sh + # Helps open a file with xdg-open from mutt in a external program without weird side effects. -[ $(uname) = "Darwin" ] && opener="open" || opener="setsid xdg-open" +[ "$(uname)" = "Darwin" ] && opener="open" || opener="setsid xdg-open" mkdir -p "/tmp/$USER-mutt-tmp" file="/tmp/$USER-mutt-tmp/$(basename "$1")" rm -f "$file" |