diff options
-rwxr-xr-x | fzf-url.sh | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -17,6 +17,7 @@ fi content="$(tmux capture-pane -J -p)" urls=($(echo "$content" |grep -oE '\b(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]')) +wwws=($(echo "$content" |grep -oE 'www(\.[^\.]+)+' | sed 's/\(.*\)/http:\/\/\1/')) ips=($(echo "$content" |grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9].*)?' | sed 's/\(.*\)/http:\/\/\1/')) merge() { @@ -25,7 +26,7 @@ merge() { done } -merge "${urls[@]}" "${ips[@]}" | +merge "${urls[@]}" "${wwws[@]}" "${ips[@]}"| sort -u | nl -w3 -s ' ' | fzf_cmd | |