commit 400c9b1732f6b5f7b84684ea07da0161d49bfd9f parent 2ed446f519c7faa1eca25866135d7d3dd8a8a0de Author: Anders Damsgaard <anders.damsgaard@geo.au.dk> Date: Thu, 10 Mar 2016 13:37:17 -0800 fix compitability with linux Diffstat:
M | .mutt/view_attachment.sh | | | 11 | +++++++++-- |
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/.mutt/view_attachment.sh b/.mutt/view_attachment.sh @@ -119,9 +119,16 @@ fi # If there's no 'open with' then we can let preview do it's thing. # Otherwise we've been told what to use. So do an open -a. +if [ `uname | grep -i Darwin` ]; then + opencmd=open +else + opencmd=xdg-open +fi if [ -z $open_with ]; then - open $newfile + echo $opencmd $newfile + $opencmd $newfile else - open -a "$open_with" $newfile + echo $opencmd -a "$open_with" $newfile + $opencmd -a "$open_with" $newfile fi