summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-08-11 05:12:32 +0200
committerhut <hut@lavabit.com>2012-08-11 05:12:32 +0200
commit289ef51a8c104fca9dd53513957f4d909c8123c0 (patch)
tree6d54e2c56cf0187b6e7c203268675d9241b6860f
parent60dcf60ac6c113faeb02ef7f6afdd0a39cd554d7 (diff)
downloadranger-289ef51a8c104fca9dd53513957f4d909c8123c0.tar.gz
ext.rifle: remove unused _apply_flags method
-rwxr-xr-xranger/ext/rifle.py30
1 files changed, 2 insertions, 28 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index feef4cac..1ad699bc 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -216,35 +216,9 @@ class Rifle(object):
 		if isinstance(flags, str):
 			self._app_flags += flags
 		self._app_flags = squash_flags(self._app_flags)
-		flags = self._app_flags
-
-		_filenames = "' '".join(f.replace("'", "'\\\''") for f in files
+		filenames = "' '".join(f.replace("'", "'\\\''") for f in files
 				if "\x00" not in f)
-		command = "set -- '%s'" % _filenames + '\n'
-
-		# Apply flags
-		command += action
-		return command
-
-	def _apply_flags(self, action, flags):
-		# FIXME: Flags do not work properly when pipes are in the command.
-		# NOTE: "r" flag is handled in execute()
-		if 't' in flags:
-			if 'TERMCMD' not in os.environ:
-				term = os.environ['TERM']
-				if term.startswith('rxvt-unicode'):
-					term = 'urxvt'
-				if term not in get_executables():
-					self.hook_logger("Can not determine terminal command.  "
-						"Please set $TERMCMD manually.")
-				os.environ['TERMCMD'] = term
-			action = "$TERMCMD -e %s" % action
-		if 'f' in flags:
-			if 'setsid' in get_executables():
-				action = "setsid %s > /dev/null 2> /dev/null &" % action
-			else:
-				action = "nohup %s > /dev/null 2> /dev/null &" % action
-		return action
+		return "set -- '%s'; %s" % (filenames, action)
 
 	def list_commands(self, files, mimetype=None):
 		"""
and' href='/akkartik/mu/commit/subx/020elf.cc?h=main&id=1d5d645be75691b535fe15e6be9d7855f62dc819'>1d5d645b ^
7df0ea4e ^

1d5d645b ^
708eae31 ^

f1b3d7b9 ^
708eae31 ^
414d9413 ^
708eae31 ^


414d9413 ^
708eae31 ^
414d9413 ^
f1b3d7b9 ^
708eae31 ^


f1b3d7b9 ^
708eae31 ^

96b2216b ^
414d9413 ^
96b2216b ^
414d9413 ^
96b2216b ^
414d9413 ^
96b2216b ^


414d9413 ^
96b2216b ^
708eae31 ^

96b2216b ^


414d9413 ^
96b2216b ^

fd7198b2 ^
96b2216b ^


708eae31 ^
9527eda9 ^
96b2216b ^
9527eda9 ^
708eae31 ^
6602c82f ^
9527eda9 ^
630433cd ^
9527eda9 ^
a1305217 ^
6602c82f ^

708eae31 ^
f1b3d7b9 ^


a413105a ^
630433cd ^
f1b3d7b9 ^
a413105a ^
a413105a ^
f1b3d7b9 ^
9527eda9 ^
f1b3d7b9 ^

4a99a6e0 ^
f1b3d7b9 ^

a413105a ^
f1b3d7b9 ^



6362c51d ^



9ad81331 ^
6362c51d ^
c442a5ad ^

f1b3d7b9 ^
708eae31 ^

9527eda9 ^
96b2216b ^
fd7198b2 ^
96b2216b ^
fd7198b2 ^
96b2216b ^



414d9413 ^
96b2216b ^



630433cd ^
96b2216b ^

414d9413 ^
4a99a6e0 ^

630433cd ^

fd7198b2 ^
630433cd ^

9527eda9 ^

665a4d70 ^
9527eda9 ^

630433cd ^
96b2216b ^


1f4d0aaf ^
fbc21293 ^
44fdc79f ^






6f6d458f ^




c88b9e31 ^

e5998f74 ^

1f4d0aaf ^
e0a0484c ^
e5998f74 ^
c442a5ad ^
e0a0484c ^
7a22a219 ^

e0a0484c ^
7a22a219 ^
e0a0484c ^

708eae31 ^



96b2216b ^



414d9413 ^


1a33d221 ^
708eae31 ^
cd23c8b6 ^
414d9413 ^


2097401c ^
708eae31 ^


708eae31 ^
087a998e ^
a066ad7e ^
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