]> Sergey Matveev's repositories - dotfiles.git/blob - links/bin/xom
Make zathura configuration file aware
[dotfiles.git] / links / bin / xom
1 #!/bin/sh -e
2
3 url="$@"
4 if [ $# -gt 1 ] ; then
5     sel="$1"
6     shift
7     case "$sel" in
8     gg) url="https://www.google.com/search?q=$@" ;;
9     oid) url="https://oidref.com/$@" ;;
10     pep) url="https://www.python.org/dev/peps/pep-0$@/" ;;
11     py) url="https://pypi.org/project/$@/" ;;
12     rfc) url="https://datatracker.ietf.org/doc/html/rfc$@" ;;
13     s) url="https://html.duckduckgo.com/html?q=$@" ;;
14     we) url="https://en.wikipedia.org/wiki/$@" ;;
15     wr) url="https://ru.wikipedia.org/wiki/$@" ;;
16     esac
17 fi
18 exec links -g "$url"