X-Git-Url: http://gitweb.pimeys.fr/?a=blobdiff_plain;f=.zsh%2Frc%2Fextra%2F20_search_engines_tools;fp=.zsh%2Frc%2Fextra%2F20_search_engines_tools;h=917927f7c5ca96282a2f18b7cfa99dac35944749;hb=3d71eab53c5b63556363ece880859b0af7f162da;hp=0000000000000000000000000000000000000000;hpb=1f8b08895681d46802368eec0764ca70d08898ca;p=config-20-100.git diff --git a/.zsh/rc/extra/20_search_engines_tools b/.zsh/rc/extra/20_search_engines_tools new file mode 100644 index 0000000..917927f --- /dev/null +++ b/.zsh/rc/extra/20_search_engines_tools @@ -0,0 +1,96 @@ +#!/bin/zsh + +# searching +#f4# Search for newspostings from authors +agoogle() { ${=BROWSER} "http://groups.google.com/groups?as_uauthors=$*" ; } +#f4# Search Debian Bug Tracking System +debbug() { + emulate -L zsh + setopt extendedglob + if [[ $# -eq 1 ]]; then + case "$1" in + ([0-9]##) + ${=BROWSER} "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$1" + ;; + (*@*) + ${=BROWSER} "http://bugs.debian.org/cgi-bin/pkgreport.cgi?submitter=$1" + ;; + (*) + ${=BROWSER} "http://bugs.debian.org/$*" + ;; + esac + else + print "$0 needs one argument" + return 1 + fi +} +#f4# Search Debian Bug Tracking System in mbox format +debbugm() { + emulate -L zsh + bts show --mbox $1 +} +#f4# Search DMOZ +dmoz() { + emulate -L zsh + ${=BROWSER} http://search.dmoz.org/cgi-bin/search\?search=${1// /_} +} +#f4# Search German Wiktionary +dwicti() { + emulate -L zsh + ${=BROWSER} http://de.wiktionary.org/wiki/${(C)1// /_} +} +#f4# Search English Wiktionary +ewicti() { + emulate -L zsh + ${=BROWSER} http://en.wiktionary.org/wiki/${(C)1// /_} +} +#f4# Search Google Groups +ggogle() { + emulate -L zsh + ${=BROWSER} "http://groups.google.com/groups?q=$*" +} +#f4# Search Google +google() { + emulate -L zsh + ${=BROWSER} "http://www.google.com/search?&num=100&q=$*" +} +#f4# Search Google Groups for MsgID +mggogle() { + emulate -L zsh + ${=BROWSER} "http://groups.google.com/groups?selm=$*" +} +#f4# Search Netcraft +netcraft(){ + emulate -L zsh + ${=BROWSER} "http://toolbar.netcraft.com/site_report?url=$1" +} +#f4# Use German Wikipedia's full text search +swiki() { + emulate -L zsh + ${=BROWSER} http://de.wikipedia.org/wiki/Spezial:Search/${(C)1} +} +#f4# search \kbd{dict.leo.org} +oleo() { + emulate -L zsh + ${=BROWSER} "http://dict.leo.org/?search=$*" +} +#f4# Search German Wikipedia +wikide() { + emulate -L zsh + ${=BROWSER} http://de.wikipedia.org/wiki/"${(C)*}" +} +#f4# Search English Wikipedia +wikien() { + emulate -L zsh + ${=BROWSER} http://en.wikipedia.org/wiki/"${(C)*}" +} +#f4# Search official debs +wodeb() { + emulate -L zsh + ${=BROWSER} "http://packages.debian.org/search?keywords=$1&searchon=contents&suite=${2:=unstable}§ion=all" +} + +#m# f4 gex() Exact search via Google +check_com google && gex () { + google "\"[ $1]\" $*" +}