You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a new option for `@fzf-url-sort-by`, defaulting to `alphabetical` as before, and adding `recency` to sort urls by recency in the scrollback history.
Most of the time when I use this plugin, I want to open the url that just got printed (usually a github PR). Sorting be recency makes it so 9/10 times, I invoke the plugin and hit enter to oepn it right away.
wwws=$(echo "$content"| grep -noE '(http?s://)?www\.[a-zA-Z](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}(/\S+)*'| grep -vE ':[0-9]*:https?://'| sed 's/^\([0-9]*\):\(.*\)$/\1:http:\/\/\2/')
44
+
ips=$(echo "$content"| grep -noE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}(:[0-9]{1,5})?(/\S+)*'| sed 's/^\([0-9]*\):\(.*\)$/\1:http:\/\/\2/')
45
+
gits=$(echo "$content"| grep -noE '(ssh://)?git@\S*'| sed 's/:/\//g'| sed 's/^\([0-9]*\)\/\/\(ssh\/\/\/\)\{0,1\}git@\(.*\)$/\1:https:\/\/\3/')
46
+
gh=$(echo "$content"| grep -noE "['\"]([_A-Za-z0-9-]*/[_.A-Za-z0-9-]*)['\"]"| sed "s/['\"]//g"| sed 's/^\([0-9]*\):\(.*\)$/\1:https:\/\/github.com\/\2/')
45
47
46
48
if [[ $#-ge 1 &&"$1"!='' ]];then
47
-
extras=$(echo "$content"|eval "$1")
49
+
extras=$(echo "$content"| nl -nln |eval"$1"| sed 's/^\([0-9]*\)\t\(.*\)$/\1:\2/')
0 commit comments