summaryrefslogtreecommitdiff
path: root/ar/.local/bin/opout
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.local/bin/opout')
-rwxr-xr-xar/.local/bin/opout4
1 files changed, 3 insertions, 1 deletions
diff --git a/ar/.local/bin/opout b/ar/.local/bin/opout
index 70bc2cb..1b84b19 100755
--- a/ar/.local/bin/opout
+++ b/ar/.local/bin/opout
@@ -9,7 +9,9 @@ basename="${1%.*}"
case "${*}" in
*.tex | *.sil | *.m[dse] | *.[rR]md | *.mom | *.[0-9])
target="$(getcomproot "$1" || echo "$1")"
- setsid -f xdg-open "${target%.*}".pdf >/dev/null 2>&1
+ target="${target##*/}"
+ target="$(find . -name "${target%.*}".pdf | head -n 1)"
+ setsid -f xdg-open "$target" >/dev/null 2>&1
;;
*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;;
*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;