]> gitweb.pimeys.fr Git - config-20-100.git/blob - .zsh/rc/extra/20_search_engines_tools
Ajout du zshrc, même s'il manque encore de commentaires etc.
[config-20-100.git] / .zsh / rc / extra / 20_search_engines_tools
1 #!/bin/zsh
2
3 # searching
4 #f4# Search for newspostings from authors
5 agoogle() { ${=BROWSER} "http://groups.google.com/groups?as_uauthors=$*" ; }
6 #f4# Search Debian Bug Tracking System
7 debbug() {
8 emulate -L zsh
9 setopt extendedglob
10 if [[ $# -eq 1 ]]; then
11 case "$1" in
12 ([0-9]##)
13 ${=BROWSER} "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$1"
14 ;;
15 (*@*)
16 ${=BROWSER} "http://bugs.debian.org/cgi-bin/pkgreport.cgi?submitter=$1"
17 ;;
18 (*)
19 ${=BROWSER} "http://bugs.debian.org/$*"
20 ;;
21 esac
22 else
23 print "$0 needs one argument"
24 return 1
25 fi
26 }
27 #f4# Search Debian Bug Tracking System in mbox format
28 debbugm() {
29 emulate -L zsh
30 bts show --mbox $1
31 }
32 #f4# Search DMOZ
33 dmoz() {
34 emulate -L zsh
35 ${=BROWSER} http://search.dmoz.org/cgi-bin/search\?search=${1// /_}
36 }
37 #f4# Search German Wiktionary
38 dwicti() {
39 emulate -L zsh
40 ${=BROWSER} http://de.wiktionary.org/wiki/${(C)1// /_}
41 }
42 #f4# Search English Wiktionary
43 ewicti() {
44 emulate -L zsh
45 ${=BROWSER} http://en.wiktionary.org/wiki/${(C)1// /_}
46 }
47 #f4# Search Google Groups
48 ggogle() {
49 emulate -L zsh
50 ${=BROWSER} "http://groups.google.com/groups?q=$*"
51 }
52 #f4# Search Google
53 google() {
54 emulate -L zsh
55 ${=BROWSER} "http://www.google.com/search?&num=100&q=$*"
56 }
57 #f4# Search Google Groups for MsgID
58 mggogle() {
59 emulate -L zsh
60 ${=BROWSER} "http://groups.google.com/groups?selm=$*"
61 }
62 #f4# Search Netcraft
63 netcraft(){
64 emulate -L zsh
65 ${=BROWSER} "http://toolbar.netcraft.com/site_report?url=$1"
66 }
67 #f4# Use German Wikipedia's full text search
68 swiki() {
69 emulate -L zsh
70 ${=BROWSER} http://de.wikipedia.org/wiki/Spezial:Search/${(C)1}
71 }
72 #f4# search \kbd{dict.leo.org}
73 oleo() {
74 emulate -L zsh
75 ${=BROWSER} "http://dict.leo.org/?search=$*"
76 }
77 #f4# Search German Wikipedia
78 wikide() {
79 emulate -L zsh
80 ${=BROWSER} http://de.wikipedia.org/wiki/"${(C)*}"
81 }
82 #f4# Search English Wikipedia
83 wikien() {
84 emulate -L zsh
85 ${=BROWSER} http://en.wikipedia.org/wiki/"${(C)*}"
86 }
87 #f4# Search official debs
88 wodeb() {
89 emulate -L zsh
90 ${=BROWSER} "http://packages.debian.org/search?keywords=$1&searchon=contents&suite=${2:=unstable}&section=all"
91 }
92
93 #m# f4 gex() Exact search via Google
94 check_com google && gex () {
95 google "\"[ $1]\" $*"
96 }