annotate src/srch @ 2104:3e7e5395f0bc

non-ASCII keybindings Alexander Voigt has kindly done some testing, and it seems that this makes bindings to most keys on a German keyboard possible -- except those that need AltGr don't work yet.
author corvid <corvid@lavabit.com>
date Thu, 23 Jun 2011 19:24:11 +0000
parents 836b65dec53b
children
rev   line source
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
1 #!/bin/sh
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
2 #
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
3 # Find a token within source files ( *.[ch] )
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
4 # Enjoy!
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
5 # Jorge.-
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
6
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
7 if [ $# = 1 ]; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
8 FLAGS="-H"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
9 elif [ $# = 2 ]; then
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
10 FLAGS="-H $1"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
11 shift 1
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
12 else
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
13 echo "Usage:"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
14 echo " srch [-options] <token>"
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
15 exit 0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
16 fi
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
17
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
18 # find "./" -name "*.[ch]" -print -exec grep $1 {} \;
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
19 egrep $FLAGS "$1" *.[ch][ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
20 egrep $FLAGS "$1" *.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
21 egrep $FLAGS "$1" IO/*.[ch][ch]*
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
22 egrep $FLAGS "$1" IO/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
23 egrep $FLAGS "$1" ../dpi/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
24 egrep $FLAGS "$1" ../dpi/*.[ch][ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
25 egrep $FLAGS "$1" ../dpid/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
26 egrep $FLAGS "$1" ../dpip/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
27 egrep $FLAGS "$1" ../dlib/*.[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
28
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
29 #egrep $FLAGS "$1" dw/*[ch]
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
30 #egrep $FLAGS "$1" lout/*[ch]
349
836b65dec53b - updated the "srch" script for the new in-tree dw2.
jcid
parents: 0
diff changeset
31 egrep $FLAGS "$1" ../dw/*[ch]
836b65dec53b - updated the "srch" script for the new in-tree dw2.
jcid
parents: 0
diff changeset
32 egrep $FLAGS "$1" ../lout/*[ch]
0
6ee11bf9e3ea Initial revision
jcid
parents:
diff changeset
33