diff --git a/application.py b/application.py index c91bd3b..77afb2b 100755 --- a/application.py +++ b/application.py @@ -69,15 +69,11 @@ class Application(object): except: color.default_color = False - # this is how we can change color settings - if curses.can_change_color(): - #curses.init_color(curses.COLOR_YELLOW, 222, 400, 900) - #curses.init_color(curses.COLOR_GREEN, 222, 400, 900) - #curses.init_color(curses.COLOR_RED, 222, 400, 222) - pass - else: - #raise Exception("urk") - self.set_error("Dynamic color not available") + ## this is how we can change color settings + #if curses.can_change_color(): + # pass + #else: + # self.set_error("Dynamic color not available") color.init() # initialize our modes diff --git a/buffer/__init__.py b/buffer/__init__.py index ab5a918..a51f976 100644 --- a/buffer/__init__.py +++ b/buffer/__init__.py @@ -453,6 +453,7 @@ class InterpreterBuffer(Buffer): env = dict(os.environ) env.update(self.get_env()) f = open('/dev/null', 'w') + #f = open('pipe-errors', 'w') self.pipe = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=f, env=env) self.prompt = '***' self.clear() @@ -496,10 +497,13 @@ class InterpreterBuffer(Buffer): self.pipe_read() return candidates def pipe_read_completions(self): - (typ_, value) = self.pipe_readline() - assert typ_ == 'COMPLETIONS', '%r %r' % (typ_, value) - candidates = [x for x in value.split('|') if x] - return candidates + try: + (typ_, value) = self.pipe_readline() + assert typ_ == 'COMPLETIONS', '%r %r' % (typ_, value) + candidates = [x for x in value.split('|') if x] + return candidates + except: + return [] def clear(self): self.set_data('', force=True) def changed(self): @@ -526,7 +530,8 @@ class IperlBuffer(InterpreterBuffer): else: return ('iperl', '-p') def get_env(self): - return {'PERL5LIB': self.application.config.get('perl.lib', '.')} + lib = ':'.join(self.application.config.get('perl.libs', [])) + return {'PERL5LIB': lib} def readline_completions(self, x1, x2, line): self.pipe.stdin.write("READLINE:%d:%d:%s\n" % (x1, x2, line)) self.pipe.stdin.flush()