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__':
tik.com> 2022-07-12 16:55:32 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2022-07-12 16:55:32 -0700 add state arg to a few functions' href='/akkartik/view.love/commit/undo.lua?id=5b91af1a66e1a3a9b52fed67727365217425b502'>5b91af1 ^
4f76ea3 ^
007b965 ^
c875f7b ^
4f76ea3 ^

007b965 ^
79a1241 ^
5b91af1 ^
79a1241 ^
5b91af1 ^
6708862 ^

5b91af1 ^


6708862 ^
5b91af1 ^
6708862 ^
4f76ea3 ^

6708862 ^

4f76ea3 ^
0fcbe31 ^
6708862 ^



4f76ea3 ^







007b965 ^
4f76ea3 ^


007b965 ^
4f76ea3 ^




29dac6a ^
007b965 ^
29dac6a ^


007b965 ^
29dac6a ^




6708862 ^











4f76ea3 ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110