aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'env/.local/bin')
-rwxr-xr-xenv/.local/bin/scripts/urlview.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/env/.local/bin/scripts/urlview.sh b/env/.local/bin/scripts/urlview.sh
index c4c38d7..797f40f 100755
--- a/env/.local/bin/scripts/urlview.sh
+++ b/env/.local/bin/scripts/urlview.sh
@@ -1,13 +1,15 @@
#!/bin/sh
-url="$(grep -o -e 'http://[^"]*' -e 'https://[^"]*' <&0 | fzf)"
+url="$(grep -o -e 'http://[^"]*' -e 'https://[^"]*' <&0 | tr ' ' '\n' | fzf)"
+[ "$url" = "" ] && exit
choices="\
clipboard
browser/xdg-open"
choice=$(echo "$choices" | fzf)
-choice=$(echo "$choice" | sed -e 's/browser\/xdg-open/xdg-open/')
+[ "$choice" = "" ] && exit
+choice=$(echo "$choice" | sed -e 's/browser\/xdg-open/xdg-open/') # browser/xdg-open should just run xdg-open
if [ "$choice" = "clipboard" ]; then
if [ -z "$WAYLAND_DISPLAY" ]; then