summaryrefslogtreecommitdiffstats
path: root/.local/bin/opout
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin/opout')
-rwxr-xr-x.local/bin/opout2
1 files changed, 1 insertions, 1 deletions
diff --git a/.local/bin/opout b/.local/bin/opout
index 7f452df..faf6575 100755
--- a/.local/bin/opout
+++ b/.local/bin/opout
@@ -4,7 +4,7 @@
# usually the pdf of a compiled document. I find this useful especially
# running from vim.
-basename="$(echo "${*}" | sed 's/\.[^\/.]*$//')"
+basename="${1%.*}"
case "${*}" in
*.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;;