Showing 2 changed files
... | ... |
@@ -329,5 +329,12 @@ dupfind() { |
329 | 329 |
gfind \( \( -name .git -o -name CVS \) -prune \) -o \( -type f \) -print0 | xargs -0 shasum | sort | guniq -w 20 -c | sort -nr |
330 | 330 |
} |
331 | 331 |
|
332 |
+es() { |
|
333 |
+ python2.7 -c "e('$1')" |
|
334 |
+} |
|
335 |
+ |
|
336 |
+load_snippet() { |
|
337 |
+ python -ic "import sitecustomize;ls('$1')" |
|
338 |
+} |
|
332 | 339 |
|
333 | 340 |
export VIRTUALENV=/usr |
... | ... |
@@ -1,5 +1,5 @@ |
1 | 1 |
#!/bin/zsh |
2 |
-grep --color='yes' -r $* | python -c " |
|
2 |
+egrep --color='yes' -r $* | python -c " |
|
3 | 3 |
import sys,itertools |
4 | 4 |
for line in sys.stdin: |
5 | 5 |
try: |
... | ... |
@@ -10,7 +10,8 @@ for line in sys.stdin: |
10 | 10 |
text = text.split() |
11 | 11 |
texti = iter(text) |
12 | 12 |
text = [list(v1 for __,v1 in v) for __,v in itertools.groupby(enumerate(text), lambda x: x[0]/20)] |
13 |
- print '%s\t\t%s' % (file, ' '.join(text[0])) |
|
13 |
+ if text: |
|
14 |
+ print '%s\t\t%s' % (file, ' '.join(text[0])) |
|
14 | 15 |
for line in text[1:]: |
15 | 16 |
print '\t\t%s' % ' '.join(line) |
16 | 17 |
" |