about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/keyapi.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ranger/keyapi.py b/ranger/keyapi.py
index 546a0641..15be9a7c 100644
--- a/ranger/keyapi.py
+++ b/ranger/keyapi.py
@@ -27,7 +27,13 @@ def make_abbreviations(command_list):
 			# do the binding
 			command_list.bind(lastarg, *args[:-1])
 		else:
-			# act as a decorator
+			# act as a decorator. eg:
+			#    @bind('a')
+			#    def do_stuff(arg):
+			#       arg.fm.ui.do_stuff()
+			#
+			# is equivalent to:
+			#    bind('a', lambda arg: arg.fm.ui.do_stuff())
 			return lambda fnc: command_list.bind(fnc, *args)
 	
 	def hint(*args):