summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-05-06 22:35:34 +0200
committerhut <hut@lepus.uberspace.de>2016-05-06 22:35:34 +0200
commit4b1207d7a91ba55c8bbd7ab29bc881daeccc3eb7 (patch)
treef2d066af9343c57bc03ef4fa5e60f9cc2a16b41b
parent60ee8098c34c4f682e7cf47b60103b11bc0db5f0 (diff)
parent46c737ea655fe17c25097a264c9cf16f3205619e (diff)
downloadranger-4b1207d7a91ba55c8bbd7ab29bc881daeccc3eb7.tar.gz
Merge branch 'draw_possible_programs-justified' of https://github.com/NoSuck/ranger
-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 ab97d81c..71cb5929 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -822,9 +822,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