Bryan Jenks cdef7b6489
error with Rmd pdf file working with opout
casing is sensitive on the rmd/Rmd files, without the uppercase option opout was not functioning for me on default LARBS with thinkpad x220. 

tested on home system and verified that functionality as intended is achieved with the `*.Rmd` option is added to the case statement
2020-01-14 09:00:47 -08:00

15 lines
528 B
Bash
Executable File

#!/usr/bin/env sh
# opout: "open output": A general handler for opening a file's intended output,
# usually the pdf of a compiled document. I find this useful especially
# running from vim.
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
case "$1" in
*.tex|*.md|*.Rmd|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
*.[0-9]) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
*.html) setsid $BROWSER "$basename".html >/dev/null 2>&1 & ;;
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
esac