summary refs log tree commit diff stats
path: root/ranger/core/actions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r--ranger/core/actions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 008a89fe..911f5ca4 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -74,6 +74,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		if hasattr(self.ui, 'open_console'):
 			self.ui.open_console(mode, string, prompt=prompt)
 
+	def execute_console(self, string='', mode=cmode.COMMAND):
+		"""Execute a command for the console"""
+		self.open_console(mode=mode, string=string)
+		self.ui.console.line = string
+		self.ui.console.execute()
+
 	def execute_file(self, files, **kw):
 		"""Execute a file.
 		app is the name of a method in Applications, without the "app_"