summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-10-11 18:01:25 +0200
committerhut <hut@lavabit.com>2011-10-11 18:01:25 +0200
commit02b078eeb5ff1987552c68e61e4b14644e0cc0ae (patch)
treee5e0d66064af7630759432c2ca9dc0f2f27f40a8 /ranger
parentf46da0ad6de5b24d3a15fccacdd074490e6330e1 (diff)
downloadranger-02b078eeb5ff1987552c68e61e4b14644e0cc0ae.tar.gz
core.actions: Pretty list of undocumented commands
Diffstat (limited to 'ranger')
-rw-r--r--ranger/core/actions.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 0989e168..e9d89061 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -807,13 +807,19 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		def write(string):
 			temporary_file.write(string.encode('utf-8'))
 
+		undocumented = []
 		for cmd_name in sorted(self.commands.commands):
 			cmd = self.commands.commands[cmd_name]
 			if hasattr(cmd, '__doc__') and cmd.__doc__:
 				write(cleandoc(cmd.__doc__))
+				write("\n\n" + "-" * 60 + "\n")
 			else:
-				write(":%s - No documentation available." % cmd.get_name())
-			write("\n\n" + "-" * 60 + "\n")
+				undocumented.append(cmd)
+
+		if undocumented:
+			write("Undocumented commands:\n\n")
+			for cmd in undocumented:
+				write("    :%s\n" % cmd.get_name())
 
 		temporary_file.flush()
 		self.run(app='pager', files=[File(temporary_file.name)])