From a78246219a6945b6a67f402c2e137de7f68ddb4a Mon Sep 17 00:00:00 2001 From: Marc <40807627+marcwallach@users.noreply.github.com> Date: Mon, 29 Jun 2020 11:03:55 -0300 Subject: [PATCH] Add support for boomer file names with spaces (#716) --- .local/bin/opout | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.local/bin/opout b/.local/bin/opout index 23f044e..7f452df 100755 --- a/.local/bin/opout +++ b/.local/bin/opout @@ -4,9 +4,9 @@ # usually the pdf of a compiled document. I find this useful especially # running from vim. -basename="$(echo "$1" | sed 's/\.[^\/.]*$//')" +basename="$(echo "${*}" | sed 's/\.[^\/.]*$//')" -case "$1" in +case "${*}" in *.tex|*.m[dse]|*.[rR]md|*.mom|*.[0-9]) setsid -f xdg-open "$basename".pdf >/dev/null 2>&1 ;; *.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;; *.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;