about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-08-06 23:35:21 +0200
committerhut <hut@lavabit.com>2012-08-06 23:38:50 +0200
commit49665d249cd6ccb83bfd1ff11160d58c025d8cb7 (patch)
treebe204daeb813c22dd578db985d409108018a958d
parentb14835a80c53a199ea54cc031ceea39b087b7e40 (diff)
downloadranger-49665d249cd6ccb83bfd1ff11160d58c025d8cb7.tar.gz
ext.rifle: notify about unknown filetype in rifle when command==ask
-rwxr-xr-xranger/ext/rifle.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index fd91c1af..821d69ab 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -382,7 +382,12 @@ def main():
 			for count, cmd, label, flags in rifle.list_commands(positional):
 				print("%d:%s:%s:%s" % (count, label or '', flags, cmd))
 		else:
-			rifle.execute(positional, number=number, label=label, flags=options.f)
+			result = rifle.execute(positional, number=number, label=label,
+					flags=options.f)
+			if result == ASK_COMMAND:
+				# TODO: implement interactive asking for file type?
+				print("Unknown file type: %s" % rifle._get_mimetype(positional[0]))
+
 
 
 if __name__ == '__main__':