X-Git-Url: http://www.git.stargrave.org/?p=dotfiles.git;a=blobdiff_plain;f=urlview%2Fbin%2Furlview;fp=urlview%2Fbin%2Furlview;h=59aa515955998e79782aef94aad5bdcf0144bd32;hp=0000000000000000000000000000000000000000;hb=d90c5e039d5cd81ec0211afec5640751731184af;hpb=48969d8d0f3a599b54a8b80b7f8e4d50819dd954 diff --git a/urlview/bin/urlview b/urlview/bin/urlview new file mode 100755 index 0000000..59aa515 --- /dev/null +++ b/urlview/bin/urlview @@ -0,0 +1,6 @@ +#!/bin/sh -e +cmd=www +# regexp is taken from urlview +grep -P -o '(((http|https|ftp|gopher)|mailto):(//)?[^ <>\"\t]*|(www|ftp)[0-9]?\\.[-a-z0-9.]+)[^ .,;\t\n\r<\">\\):]?[^, <>\"\t]*[^ .,;\t\n\r<\">\\):]' "$@" | +fzf --bind="enter:execute($cmd {})" \ + --bind="ctrl-f:execute(rlwrap --history-filename /dev/null --pre-given={} head -1 | xargs $cmd)"