summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-11-14 14:56:28 +0100
committerhut <hut@lepus.uberspace.de>2015-11-14 15:00:47 +0100
commit740261f127d52bc612674a2bb7a9794c587d5b0a (patch)
tree12fd0fa57149b8ae7bc451047d12b059e69e0108 /ranger
parent84247cffc5ecc3d20bb332718d4d9543be74e869 (diff)
downloadranger-740261f127d52bc612674a2bb7a9794c587d5b0a.tar.gz
Added :echo command, disabled :notify command
Diffstat (limited to 'ranger')
-rw-r--r--ranger/config/commands.py10
-rw-r--r--ranger/core/main.py2
2 files changed, 11 insertions, 1 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 4f7f109a..0dc22147 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -98,6 +98,16 @@ class alias(Command):
         else:
             self.fm.commands.alias(self.arg(1), self.rest(2))
 
+
+class echo(Command):
+    """:echo <text>
+
+    Display the text in the statusbar.
+    """
+    def execute(self):
+        self.fm.notify(self.rest(1))
+
+
 class cd(Command):
     """:cd [-r] <dirname>
 
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 55102dc2..96f56bf1 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -245,7 +245,7 @@ def load_settings(fm, clean):
 
     # Load default commands
     fm.commands = ranger.api.commands.CommandContainer()
-    exclude = ['settings']
+    exclude = ['settings', 'notify']
     include = [name for name in dir(Actions) if name not in exclude]
     fm.commands.load_commands_from_object(fm, include)
     fm.commands.load_commands_from_module(commands)