summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-04-14 00:12:41 +0200
committerhut <hut@lepus.uberspace.de>2015-04-14 00:12:56 +0200
commit0ca4102eba666be641f1e3f19548c304de52fee5 (patch)
tree62e9d049aeb5a1771a06f49a52cfea98ebfe2e1a
parent1aa06810e0485399b312263bc5020c758dedaacf (diff)
downloadranger-0ca4102eba666be641f1e3f19548c304de52fee5.tar.gz
config.commands: fixed :meta tab completion
-rw-r--r--ranger/config/commands.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 22fd49a5..d2df029a 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -1471,7 +1471,11 @@ class meta(prompt_metadata):
         key = self.arg(1)
         metadata = self.fm.metadata.get_metadata(self.fm.thisfile.path)
         if key in metadata and metadata[key]:
-            return self.arg(0) + " " + metadata[key]
+            return [" ".join([self.arg(0), self.arg(1), metadata[key]])]
+        else:
+            return [self.arg(0) + " " + key for key in sorted(metadata)
+                    if key.startswith(self.arg(1))]
+
 
 class linemode(default_linemode):
     """