aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin/rofiwebsurf
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin/rofiwebsurf')
-rwxr-xr-xdotfiles/.local/bin/rofiwebsurf3
1 files changed, 2 insertions, 1 deletions
diff --git a/dotfiles/.local/bin/rofiwebsurf b/dotfiles/.local/bin/rofiwebsurf
index b6f6e87..bcba65f 100755
--- a/dotfiles/.local/bin/rofiwebsurf
+++ b/dotfiles/.local/bin/rofiwebsurf
@@ -3,7 +3,8 @@
if [ "$ROFI_RETV" != 0 ]; then
choice="$1"
if echo "$choice" | egrep ".*://.*" >/dev/null 2>&1; then
- choice="$(echo "$choice" | sed -E 's/(.*:\/\/([^[:space:]])*).*/\1/g' |
+ choice="$(echo "$choice" | grep -Eo "[^[:space:]]*:\/\/[^[:space:]]*" |
+ head -n1 |
grep -E "https?:" || echo "$choice")"
mimeo "$choice" > /dev/null
else