summaryrefslogtreecommitdiffstats
path: root/.local/bin/opout
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2022-08-19 14:40:25 -0400
committerLuke Smith <luke@lukesmith.xyz>2022-08-19 14:40:25 -0400
commitb82b091d96447860decae6d8495d036b4abddaa0 (patch)
treeb7569c69c92859ad7c5ef455222dfd2f88ae9eb8 /.local/bin/opout
parent1a37b0bc99d71899ea243448a315e611b51bea2e (diff)
downloadeibhear-b82b091d96447860decae6d8495d036b4abddaa0.tar.gz
eibhear-b82b091d96447860decae6d8495d036b4abddaa0.tar.zst
eibhear-b82b091d96447860decae6d8495d036b4abddaa0.zip
separate script for use in opout, use just % root=
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 faf6575..8890861 100755
--- a/.local/bin/opout
+++ b/.local/bin/opout
@@ -7,7 +7,7 @@
basename="${1%.*}"
case "${*}" in
- *.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;;
+ *.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) target="$(getcomproot "$1" || echo "$1")" ; setsid -f xdg-open "${target%.*}".pdf >/dev/null 2>&1 ;;
*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;;
*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;
esac