diff --git a/.scripts/tools/opout b/.scripts/tools/opout index d52f285..c742aa9 100755 --- a/.scripts/tools/opout +++ b/.scripts/tools/opout @@ -2,7 +2,7 @@ # opout: "open output": A general handler for opening a file's intended output. # I find this useful especially running from vim. -basename="${1%.*}" +basename="$(echo "$1" | sed 's/\.[^\/.]*$//')" case "$1" in *.tex|*.md|*.rmd|*.ms|*.me|*.mom) setsid "$READER" "$basename".pdf >/dev/null 2>&1 & ;;