From: Sergey Matveev Date: Mon, 1 May 2023 16:54:18 +0000 (+0300) Subject: links starter X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;ds=sidebyside;h=37832957c4dadb7b1399ec1230a5385e60dad06e;p=dotfiles.git links starter --- diff --git a/links/bin/lg b/links/bin/lg new file mode 100755 index 0000000..57d4f5c --- /dev/null +++ b/links/bin/lg @@ -0,0 +1,18 @@ +#!/bin/sh -e + +url="$@" +if [ $# -gt 1 ] ; then + sel="$1" + shift + case "$sel" in + gg) url="https://www.google.com/search?q=$@" ;; + oid) url="https://oidref.com/$@" ;; + pep) url="https://www.python.org/dev/peps/pep-0$@/" ;; + py) url="https://pypi.org/project/$@/" ;; + rfc) url="https://datatracker.ietf.org/doc/html/rfc$@" ;; + s) url="https://html.duckduckgo.com/html?q=$@" ;; + we) url="https://en.wikipedia.org/wiki/$@" ;; + wr) url="https://ru.wikipedia.org/wiki/$@" ;; + esac +fi +exec links -g "$url"