opout (429B)
1 #!/usr/bin/env sh 2 # opout: "open output": A general handler for opening a file's intended output. 3 # I find this useful especially running from vim. 4 5 basename="$(echo "$1" | sed 's/\.[^\/.]*$//')" 6 7 case "$1" in 8 *.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;; 9 *.html) setsid "$BROWSER" --new-window "$basename".html >/dev/null 2>&1 & ;; 10 *.sent) setsid sent "$1" >/dev/null 2>&1 & ;; 11 esac