Merge pull request #70 from polarkac/show_version
authorOrakaro <DTVD@users.noreply.github.com>
Thu, 23 Oct 2014 02:15:17 +0000 (11:15 +0900)
committerOrakaro <DTVD@users.noreply.github.com>
Thu, 23 Oct 2014 02:15:17 +0000 (11:15 +0900)
Show version

rainbowstream/rainbow.py

index 2b8a456..284a628 100644 (file)
@@ -178,6 +178,8 @@ def upgrade_center():
             notice += light_magenta('You should upgrade with ')
             notice += light_green('pip install -U rainbowstream')
             printNicely(notice)
+        else:
+            printNicely(yellow('You are running latest ' + current + ' version.'))
     except:
         pass
 
@@ -1778,7 +1780,8 @@ cmdset = [
     'p',
     'r',
     'c',
-    'q'
+    'q',
+    'version',
 ]
 
 # Handle function set
@@ -1824,7 +1827,8 @@ funcset = [
     pause,
     replay,
     clear,
-    quit
+    quit,
+    upgrade_center,
 ]
 
 
@@ -1903,6 +1907,7 @@ def listen():
             [],  # reconnect
             [],  # clear
             [],  # quit
+            [],  # version
         ]
     ))
     init_interactive_shell(d)