diff options
author | hut <hut@lavabit.com> | 2012-08-06 23:35:21 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-08-06 23:38:50 +0200 |
commit | 49665d249cd6ccb83bfd1ff11160d58c025d8cb7 (patch) | |
tree | be204daeb813c22dd578db985d409108018a958d /ranger | |
parent | b14835a80c53a199ea54cc031ceea39b087b7e40 (diff) | |
download | ranger-49665d249cd6ccb83bfd1ff11160d58c025d8cb7.tar.gz |
ext.rifle: notify about unknown filetype in rifle when command==ask
Diffstat (limited to 'ranger')
-rwxr-xr-x | ranger/ext/rifle.py | 7 |
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__': |