##// END OF EJS Templates
add ipy_miscapps.py, with one completer (surfraw)
Ville M. Vainio -
Show More
@@ -0,0 +1,19 b''
1 """ Completers for miscellaneous command line apps
2
3 """
4 import IPython.ipapi
5 ip = IPython.ipapi.get()
6 import os
7
8 def surfraw_completer(self,cmdline):
9 """ Completer for 'surfraw'
10
11 example::
12 sr go<tob> => sr google
13
14 """
15 compl = [l.split(None,1)[0] for l in os.popen('sr -elvi')]
16 return compl
17
18
19 ip.set_hook('complete_command', surfraw_completer, str_key = 'sr') No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now