diff options
Diffstat (limited to 'bin/fl')
| -rwxr-xr-x | bin/fl | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14,8 +14,8 @@ re_urls='((https?://|www\.)[[:alnum:].]*:?[[:alnum:]./@$&%?$#=_-]*)' # finds links, puts them in a list # sort -u prevents duplicates, but also sorts the links urlparse() { - lstrip "$(cat)" "*\│" |\ - grep -Eo "$re_urls" |\ + lstrip "$(cat)" "*\│" | + grep -Eo "$re_urls" | sort -u | sed 's|^www.|http://www\.|g' } if [ -n "$1" ]; then @@ -28,5 +28,5 @@ fi IFS= # send any found links to dmenu so one can be chosen to be sent to the clipboard -[ -n "$urls" ] &&\ +[ -n "$urls" ] && echo $urls | dmenu -i -p 'copy which url?' -l 10 | xclip -r -sel c
\ No newline at end of file |