#!/bin/sh -e

# shellcheck disable=SC2002
cat "/dev/stdin" \
  | grep -E -o '(https?|ftp|file):/?//[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%~_|]' \
  | sort | uniq \
  | FZF_DEFAULT_OPTS='
    --select-1 --exit-0
    --prompt=" "
    --inline-info
    --color fg:248,hl:250,fg+:232,bg+:231,hl+:2
    --color info:108,prompt:242,spinner:108,pointer:1,marker:168
' fzf | xargs open -g
