From 37832957c4dadb7b1399ec1230a5385e60dad06e Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 1 May 2023 19:54:18 +0300 Subject: [PATCH] links starter --- links/bin/lg | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 links/bin/lg 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" -- 2.44.0