complete for Mac
authorOrakaro <nhatminh_179@hotmail.com>
Wed, 28 May 2014 14:31:43 +0000 (23:31 +0900)
committerOrakaro <nhatminh_179@hotmail.com>
Wed, 28 May 2014 14:31:43 +0000 (23:31 +0900)
rainbowstream/interactive.py
rainbowstream/rainbow.py

index e27c17780e3cd7d1256bb5b52503d9c68f79e14b..69efa547af175dfb0daea392edd6b06983934e27 100644 (file)
@@ -1,5 +1,5 @@
 import readline
-
+import rlcompleter
 
 class RainbowCompleter(object):
 
@@ -35,5 +35,8 @@ def init_interactive_shell(set):
     Init the rainbow shell
     """
     readline.set_completer(RainbowCompleter(set).complete)
-    readline.parse_and_bind('tab: complete')
     readline.parse_and_bind('set editing-mode vi')
+    if 'libedit' in readline.__doc__:
+        readline.parse_and_bind("bind ^I rl_complete")
+    else:
+        readline.parse_and_bind("tab: complete")
\ No newline at end of file
index dcb5e0824fda8c184d3cdd0075abda88ee9f0018..3ef13d42257d83b60bdae54f374583697b077648 100644 (file)
@@ -56,6 +56,7 @@ def draw(t, keyword=None):
     date = date - datetime.timedelta(seconds=time.timezone)
     clock = date.strftime('%Y/%m/%d %H:%M:%S')
 
+    print('before search')
     res = db.tweet_query(tid)
     if not res:
         db.store(tid)
@@ -383,8 +384,6 @@ def stream():
 
     # The Logo
     ascii_art()
-    g['stuff'] = '1'
-    home()
     # These arguments are optional:
     stream_args = dict(
         timeout=args.timeout,