summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-19 21:45:25 +0200
committerhut <hut@lavabit.com>2010-04-19 21:45:25 +0200
commit7821555cdbd28cd710ce94cde8bfd90e5cf1a13a (patch)
tree5d7396ad5c713823a8b954d9669f8bc7e62d9e18
parenteaaeed3da091fb293825403025dcc4a6dbd4dce3 (diff)
downloadranger-7821555cdbd28cd710ce94cde8bfd90e5cf1a13a.tar.gz
Turn keycomb ".term" into command ":terminal"
-rw-r--r--ranger/defaults/commands.py10
-rw-r--r--ranger/defaults/keys.py1
-rw-r--r--ranger/help/console.py3
3 files changed, 13 insertions, 1 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index 241e66df..6088e8ff 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -221,6 +221,16 @@ class quit_now(Command):
 		self.fm.exit()
 
 
+class terminal(Command):
+	"""
+	:terminal
+
+	Spawns an "x-terminal-emulator" starting in the current directory.
+	"""
+	def execute(self):
+		self.fm.run('x-terminal-emulator', flags='d')
+
+
 class delete(Command):
 	"""
 	:delete
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index 0a9cb6a3..8c4c3535 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -167,7 +167,6 @@ map('p<bg>', fm.hint('press *p* once again to confirm pasting' \
 # ---------------------------------------------------- run programs
 map('S', fm.execute_command(os.environ['SHELL']))
 map('E', fm.edit_file())
-map('.term', fm.execute_command('x-terminal-emulator', flags='d'))
 map('du', fm.execute_command('du --max-depth=1 -h | less'))
 
 # -------------------------------------------------- toggle options
diff --git a/ranger/help/console.py b/ranger/help/console.py
index 76ce9f59..c62d0244 100644
--- a/ranger/help/console.py
+++ b/ranger/help/console.py
@@ -103,6 +103,9 @@ it conflicts with ":cd".
 :rename <newname>
       Changes the name of the currently highlighted file to <newname>
 
+:terminal
+      Spawns "x-terminal-emulator" starting in the current directory.
+
 :touch <filename>
       Creates a file with the name <filename>