summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2015-02-18 11:23:15 +0100
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2015-02-18 11:25:32 +0100
commit64cac6291029dd7b1795066ab17393714e9fd045 (patch)
tree890533bfc740ff0e95760d739b88357e8c3ef415
parenta949de1706994396bfe763f2bce0979b48dfa94d (diff)
downloadranger-64cac6291029dd7b1795066ab17393714e9fd045.tar.gz
core.actions: the file macros work properly with :flat
%s, %f and %t in particular.
-rw-r--r--ranger/core/actions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 1167dab5..08e0420b 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -258,12 +258,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
         macros['rangerdir'] = ranger.RANGERDIR
 
         if self.fm.thisfile:
-            macros['f'] = self.fm.thisfile.basename
+            macros['f'] = self.fm.thisfile.relative_path
         else:
             macros['f'] = MACRO_FAIL
 
         if self.fm.thistab.get_selection:
-            macros['s'] = [fl.basename for fl in self.fm.thistab.get_selection()]
+            macros['s'] = [fl.relative_path for fl in self.fm.thistab.get_selection()]
         else:
             macros['s'] = MACRO_FAIL
 
@@ -273,7 +273,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
             macros['c'] = MACRO_FAIL
 
         if self.fm.thisdir.files:
-            macros['t'] = [fl.basename for fl in self.fm.thisdir.files
+            macros['t'] = [fl.relative_path for fl in self.fm.thisdir.files
                     if fl.realpath in (self.fm.tags or [])]
         else:
             macros['t'] = MACRO_FAIL
a8539c3'>f9737251 ^
a7d89e0e ^
9b177a9e ^
929be7f1 ^
9b177a9e ^
0fbaa6f5 ^
ee8ff948 ^

697db019 ^
8f213f22 ^
1e60d17d ^
0a57c4de ^
d28930ea ^
fc5bfb7d ^
fe519410 ^

5d9c7ffd ^
78e4524d ^

a4cadf78 ^
0a57c4de ^
a4cadf78 ^
9b55f2de ^
a4cadf78 ^

9d34c412 ^

0a57c4de ^
a4cadf78 ^

9b55f2de ^
a4cadf78 ^
0a57c4de ^

a4cadf78 ^



0a57c4de ^

c23506f4 ^
90b9b48a ^
0a57c4de ^
9b177a9e ^
b30155a1 ^
264fc55a ^
0a57c4de ^
9b177a9e ^
2490c3ed ^

0a57c4de ^
2602cbf7 ^



a2726b6a ^
b9ab5d9f ^
a2726b6a ^
3d8b1a5a ^
0e1bccda ^
83bd2073 ^
fcfdc175 ^
020e516a ^
279737ba ^
a2726b6a ^
dbfb1551 ^
4f19ea26 ^
41fe8c22 ^
3656c782 ^
41fe8c22 ^
bc3c4e09 ^
ac7ec7f2 ^
5be47cc5 ^
b43252a6 ^
e7bfaa64 ^
54e225aa ^
a2726b6a ^

e8314106 ^
e7bfaa64 ^
2cdbfc7e ^
4c42ce97 ^
a70aa025 ^
a2726b6a ^
cfef64c7 ^
a70aa025 ^




2cdbfc7e ^
9b177a9e ^
2cdbfc7e ^
1155ceab ^
41fe8c22 ^
2cdbfc7e ^
0649aad8 ^
94b0d2c6 ^
2cdbfc7e ^
697db019 ^
de65f505 ^
1e60d17d ^
dbfb1551 ^
dbfb1551 ^
c16871d1 ^

fcfdc175 ^




3656c782 ^
a2726b6a ^
b9ab5d9f ^
a2726b6a ^
3656c782 ^
cfef64c7 ^
b9ab5d9f ^
a2726b6a ^
3656c782 ^
cfef64c7 ^
e5ac12af ^
3656c782 ^
b9ab5d9f ^
b9ab5d9f ^


a2726b6a ^
b9ab5d9f ^
d28930ea ^
e81dc3b5 ^

e21bc7af ^

30180ac8 ^
1b0ce852 ^



4f19ea26 ^
1b0ce852 ^
ef942bd2 ^
c90c83f7 ^
10ca3e8c ^
75cfe388 ^
e8314106 ^
4f19ea26 ^
9b177a9e ^

a2726b6a ^
ee8ff948 ^
a2726b6a ^
ee8ff948 ^
dba48f18 ^
9b177a9e ^
dba48f18 ^
4f19ea26 ^
b9ab5d9f ^
8c5866ff ^
6826a66f ^
4f19ea26 ^



a2726b6a ^
4f19ea26 ^
e5ac12af ^
4f19ea26 ^

e131afdb ^
88f423af ^
b9ab5d9f ^

17757c86 ^
d96e68ea ^
904a5a81 ^
9b177a9e ^
bd1c1394 ^

9b177a9e ^
2490c3ed ^

2602cbf7 ^


d6589157 ^
41fe8c22 ^
697db019 ^
de65f505 ^
1e60d17d ^
d6e4b748 ^
d3cc5bd7 ^
b9ab5d9f ^




3983ee1d ^

0d0ed9b7 ^




055a5f71 ^
3bb1f124 ^
055a5f71 ^


697db019 ^
12727744 ^
1e60d17d ^
88f423af ^
41fe8c22 ^
0338d136 ^
22589e87 ^
9b177a9e ^
c98ce429 ^

9b177a9e ^
551f7df1 ^

199162b1 ^


6bad38c2 ^
e8b2b719 ^
89967905 ^
d96e68ea ^
e8314106 ^
6bad38c2 ^
41fe8c22 ^
1926ceea ^

c851a48a ^
b9ab5d9f ^
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269