Skip to content

Instantly share code, notes, and snippets.

@hktonylee
Created June 15, 2018 20:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hktonylee/ca56920dd0323c1c40726764d1d21b7e to your computer and use it in GitHub Desktop.
Save hktonylee/ca56920dd0323c1c40726764d1d21b7e to your computer and use it in GitHub Desktop.
Interactively open URLs
#!/usr/bin/env fish
function +fzf_open_url
[ -z "$FZF_OPEN_URL_LIST" ]; and echo "Please configure \$FZF_OPEN_URL_LIST first." >&2; and return
set -l result ( \
cat $FZF_OPEN_URL_LIST \
| sort \
| uniq \
| grep -ve '^$' \
| fzf --bind "enter:execute-silent:open {}" \
)
# [ $status -eq 0 ]; and open $result
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment