]> Sergey Matveev's repositories - dotfiles.git/blob - urlview/bin/urlview
9259818644e549b79c7650328061c51422a7119d
[dotfiles.git] / urlview / bin / urlview
1 #!/bin/sh -e
2 cmd=www
3 # regexp is taken from urlview
4 grep -P -o '(((http|https|ftp|gopher)|mailto):(//)?[^ <>\"\t]*|(www|ftp)[0-9]?\\.[-a-z0-9.]+)[^ .,;\t\n\r<\">\\):]?[^, <>\"\t]*[^ .,;\t\n\r<\">\\):]' "$@" |
5 fzf --bind="enter:execute($cmd {})" \
6     --bind="ctrl-f:execute(rlwrap --pre-given={} head -1 | xargs $cmd)"