summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorThe Flying Rapist <admin@nosuck.org>2016-04-11 04:35:57 -0400
committerThe Flying Rapist <admin@nosuck.org>2016-04-11 04:35:57 -0400
commit46c737ea655fe17c25097a264c9cf16f3205619e (patch)
treeadb8c9222cc3a1876639663ea8f8f1e687c5dc8b
parent7ee4b45bd2619fb07c9b139940003224bedb1de3 (diff)
downloadranger-46c737ea655fe17c25097a264c9cf16f3205619e.tar.gz
Program indices now line up nicely.
-rw-r--r--ranger/core/actions.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index e692eb39..a44e30e1 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -804,9 +804,12 @@ class Actions(FileManagerAware, SettingsAware):
         except:
             self.ui.browser.draw_info = []
             return
-        programs = self.rifle.list_commands([target.path], None)
-        programs = ['%s | %s' % program[0:2] for program in programs]
-        self.ui.browser.draw_info = programs
+        programs = [program for program in self.rifle.list_commands([target.path],
+                None)]
+        num_digits = len(str(len(programs)))
+        program_info = ['%s | %s' % (str(program[0]).rjust(num_digits),
+                program[1]) for program in programs]
+        self.ui.browser.draw_info = program_info
 
     def hide_console_info(self):
         self.ui.browser.draw_info = False