From 49665d249cd6ccb83bfd1ff11160d58c025d8cb7 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 6 Aug 2012 23:35:21 +0200 Subject: ext.rifle: notify about unknown filetype in rifle when command==ask --- ranger/ext/rifle.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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__': -- cgit 1.4.1-2-gfad0