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
='n161' href='#n161'>161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226