25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

openfile 313 B

123456789
  1. #!/bin/sh
  2. # Helps open a file with xdg-open from mutt in a external program without weird side effects.
  3. [ $(uname) = "Darwin" ] && opener="open" || opener="setsid xdg-open"
  4. mkdir -p "/tmp/$USER-mutt-tmp"
  5. file="/tmp/$USER-mutt-tmp/$(basename "$1")"
  6. rm -f "$file"
  7. cp "$1" "$file"
  8. $opener "$file" >/dev/null 2>&1 &