2018-10-04 18:00:58 +00:00
|
|
|
#!/bin/sh
|
2018-07-30 05:19:40 +00:00
|
|
|
# opout: "open output": A general handler for opening a file's intended output.
|
|
|
|
# I find this useful especially running from vim.
|
|
|
|
|
2019-01-08 18:52:05 +00:00
|
|
|
basename="$(echo "$1" | sed 's/\.[^\/.]*$//')"
|
2018-07-30 05:19:40 +00:00
|
|
|
|
2018-10-04 18:00:58 +00:00
|
|
|
case "$1" in
|
2018-11-24 14:08:43 +00:00
|
|
|
*.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;
|
2018-12-05 20:15:46 +00:00
|
|
|
*.html) setsid "$BROWSER" --new-window "$basename".html >/dev/null 2>&1 & ;;
|
2018-11-01 01:54:30 +00:00
|
|
|
*.sent) setsid sent "$1" >/dev/null 2>&1 & ;;
|
2018-07-30 05:19:40 +00:00
|
|
|
esac
|