summary refs log tree commit diff stats
path: root/ranger
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 /ranger
parent1aa06810e0485399b312263bc5020c758dedaacf (diff)
downloadranger-0ca4102eba666be641f1e3f19548c304de52fee5.tar.gz
config.commands: fixed :meta tab completion
Diffstat (limited to 'ranger')
-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):
     """
#n141'>141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 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