summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/api/commands.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/ranger/api/commands.py b/ranger/api/commands.py
index 73975adc..ca3f730d 100644
--- a/ranger/api/commands.py
+++ b/ranger/api/commands.py
@@ -48,13 +48,14 @@ class CommandContainer(object):
 	def get_command(self, name, abbrev=True):
 		if abbrev:
 			lst = [cls for cmd, cls in self.commands.items() \
-					if cmd.startswith(name) \
-					and cls.allow_abbrev \
+					if cls.allow_abbrev and cmd.startswith(name) \
 					or cmd == name]
 			if len(lst) == 0:
 				raise KeyError
-			if len(lst) == 1 or self.commands[name] in lst:
+			if len(lst) == 1:
 				return lst[0]
+			if self.commands[name] in lst:
+				return self.commands[name]
 			raise ValueError("Ambiguous command")
 		else:
 			try:
t.com> 2009-12-11 22:30:07 +0100 committer hut <hut@lavabit.com> 2009-12-11 22:30:07 +0100 Reorganization of gui/widget hierarchy and directory structure' href='/akspecs/ranger/commit/ranger/gui/defaultui.py?id=d88232a386dbc2153aa12bea7f30c9c53c414010'>d88232a3 ^
cfdbb9d6 ^
b5393406 ^
06aefcf5 ^

a6791aee ^
d88232a3 ^
a6791aee ^
9506fb8e ^
8db3c4b1 ^



e6dfc442 ^
a6791aee ^
b5393406 ^


ddf828fb ^
a6791aee ^
8db3c4b1 ^
a6791aee ^


c1033553 ^
a6791aee ^
c1033553 ^

a6791aee ^
06aefcf5 ^
42fd3690 ^
a6791aee ^
06aefcf5 ^
d88232a3 ^

1159f9ec ^
49ae0dd1 ^
9506fb8e ^
6f43de0a ^


d88232a3 ^
cfdbb9d6 ^

a923ead7 ^
6f43de0a ^

e6dfc442 ^
06aefcf5 ^
5715beca ^

491a5312 ^
06aefcf5 ^

8db3c4b1 ^
06aefcf5 ^

5715beca ^

491a5312 ^
06aefcf5 ^

8db3c4b1 ^
5715beca ^
06aefcf5 ^

8db3c4b1 ^

06aefcf5 ^

8db3c4b1 ^
06aefcf5 ^
7ec262f8 ^

e6dfc442 ^

cfdbb9d6 ^
e6dfc442 ^


cfdbb9d6 ^
5715beca ^
e6dfc442 ^
b5393406 ^
8db3c4b1 ^
b5393406 ^

e07cfa31 ^


ddf828fb ^
b5393406 ^

8db3c4b1 ^
b5393406 ^
ddf828fb ^
e6dfc442 ^
8db3c4b1 ^

633387ba ^
9a78b644 ^




a396b3a0 ^

6f43de0a ^
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117