Add possibility to go to url in search script

Also fix colors after plugins update in nvim config.
This commit is contained in:
Wiktor Zykubek 2020-05-23 20:47:32 +02:00
parent 7b2597b63c
commit 76613763ba
2 changed files with 6 additions and 2 deletions

View File

@ -22,7 +22,7 @@ hi Title ctermfg=15 ctermbg=NONE cterm=NONE
hi LineNr ctermfg=238 cterm=none
hi CursorLineNr ctermfg=220 ctermbg=8 cterm=bold
hi ColorColumn ctermfg=1 ctermbg=0 cterm=undercurl
hi SignColumn ctermfg=7
hi SignColumn ctermfg=7 ctermbg=none
hi VertSplit ctermfg=0 ctermbg=8
hi Comment ctermfg=4

View File

@ -12,6 +12,10 @@ chosen="$(
[ ! "$chosen" ] && exit 0
url="$(grep -m 1 "$chosen" "$bmfile" | awk '{ print $1 }')"
[ ! "$url" ] && url="https://duckduckgo.com/?q=$chosen"
[ ! "$url" ] && {
[ "$(echo "$chosen" | grep "[a-z|0-9]\.[a-z|0-9]")" ] &&
url="https://$chosen" || url="https://duckduckgo.com/?q=$chosen"
}
"$BROWSER" "$url"