summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-17 12:38:21 +0100
committerhut <hut@lavabit.com>2010-03-17 12:38:21 +0100
commit9207e83c0672c6b8b49fce3b621197fb1e77b2be (patch)
tree80d8d2875291fc29a21b94b00b460e51302c6401 /ranger
parent9a735f62cfb4a16eb711750883f68f8099508f4b (diff)
downloadranger-9207e83c0672c6b8b49fce3b621197fb1e77b2be.tar.gz
fixed #69: tab completion breaks with Apps subclass
Diffstat (limited to 'ranger')
-rw-r--r--ranger/api/apps.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/ranger/api/apps.py b/ranger/api/apps.py
index e61b5e2c..a17a6601 100644
--- a/ranger/api/apps.py
+++ b/ranger/api/apps.py
@@ -112,8 +112,12 @@ class Applications(FileManagerAware):
 
 	def all(self):
 		"""Returns a list with all application functions"""
-		methods = self.__class__.__dict__
-		return [meth[4:] for meth in methods if meth.startswith('app_')]
+		result = set()
+		# go through all the classes in the mro (method resolution order)
+		# so subclasses will return the apps of their superclasses.
+		for cls in self.__class__.__mro__:
+			result |= set(m[4:] for m in cls.__dict__ if m.startswith('app_'))
+		return sorted(result)
 
 
 def tup(*args):