From d99097166c75cb473bc4af4f77c0ca22a1be6290 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 8 Jan 2019 13:52:05 -0500 Subject: [PATCH] opout posix --- .scripts/tools/opout | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 & ;;