##// END OF EJS Templates
Fix rpmlint: non-executable-script...
Fix rpmlint: non-executable-script """ This text file contains a shebang or is located in a path dedicated for executables, but lacks the executable bits and cannot thus be executed. If the file is meant to be an executable script, add the executable bits, otherwise remove the shebang or move the file elsewhere. """ Mostly deleting the shebang, but some files contain a __main__ function, so make them executable. This is the last commit of this series and: Closes gh-647.

File last commit:

r4574:a8c54759
r4574:a8c54759
Show More
ipy_gnuglobal.py
35 lines | 867 B | text/x-python | PythonLexer
vivainio
crlf cleanup
r680 """
Add %global magic for GNU Global usage.
http://www.gnu.org/software/global/
"""
Brian Granger
ipapi.py => core/ipapi.py and imports updated.
r2027 from IPython.core import ipapi
ip = ipapi.get()
vivainio
crlf cleanup
r680 import os
# alter to your liking
global_bin = 'd:/opt/global/bin/global'
def global_f(self,cmdline):
simple = 0
if '-' not in cmdline:
cmdline = '-rx ' + cmdline
simple = 1
lines = [l.rstrip() for l in os.popen( global_bin + ' ' + cmdline ).readlines()]
if simple:
parts = [l.split(None,3) for l in lines]
lines = ['%s [%s]\n%s' % (p[2].rjust(70),p[1],p[3].rstrip()) for p in parts]
print "\n".join(lines)
Brian Granger
Continuing a massive refactor of everything.
r2205 ip.define_magic('global', global_f)
vivainio
crlf cleanup
r680
def global_completer(self,event):
compl = [l.rstrip() for l in os.popen(global_bin + ' -c ' + event.symbol).readlines()]
return compl
ip.set_hook('complete_command', global_completer, str_key = '%global')