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):
 		"""