From 740261f127d52bc612674a2bb7a9794c587d5b0a Mon Sep 17 00:00:00 2001 From: hut Date: Sat, 14 Nov 2015 14:56:28 +0100 Subject: Added :echo command, disabled :notify command --- ranger/config/commands.py | 10 ++++++++++ ranger/core/main.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'ranger') 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 + + Display the text in the statusbar. + """ + def execute(self): + self.fm.notify(self.rest(1)) + + class cd(Command): """:cd [-r] 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) -- cgit 1.4.1-2-gfad0 kkartik/mu/about/?h=main'>about summary refs log tree commit diff stats
blob: 58fd145dfba2ece9d41748b2b622edbff38a0179 (plain) (blame)
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