summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-08-28 08:10:34 +0200
committerhut <hut@lavabit.com>2010-08-28 08:10:34 +0200
commit56f380c61f62a18b39375da7e7cd93d443be8aef (patch)
tree026dd8a65b8af9c5553d56f16e9382925e42f4c5
parentb80a91f6fc0f8fb7af50fff9956d54da20304c9c (diff)
downloadranger-56f380c61f62a18b39375da7e7cd93d443be8aef.tar.gz
cleaned up and fine tuned :find command
-rw-r--r--ranger/defaults/commands.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index adc166df..f1c92274 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -260,22 +260,13 @@ class find(Command):
 	tab = Command._tab_directory_content
 
 	def execute(self):
-		import re
-		search = parse(self.line).rest(1)
-		search = re.escape(search)
-		self.fm.env.last_search = re.compile(search, re.IGNORECASE)
-		self.fm.search_method = 'search'
-
 		if self.count == 1:
 			self.fm.move(right=1)
 			self.fm.block_input(0.5)
+		else:
+			self.fm.cd(parse(self.line).rest(1))
 
 	def quick(self):
-		self._search()
-		if self.count == 1:
-			return True
-
-	def _search(self):
 		self.count = 0
 		line = parse(self.line)
 		cwd = self.fm.env.cwd
@@ -284,6 +275,11 @@ class find(Command):
 		except IndexError:
 			return False
 
+		if arg == '.':
+			return False
+		if arg == '..':
+			return True
+
 		deq = deque(cwd.files)
 		deq.rotate(-cwd.pointer)
 		i = 0
@lavabit.com> 2010-03-12 00:46:47 +0100 README: updated' href='/akspecs/ranger/commit/README?h=v1.4.3&id=0a32b6845829751de8fc2fd4957c360bb4162ace'>0a32b684 ^
cfcfd885 ^
712aa449
4ea0f69a ^


712aa449
0a32b684 ^


2144cf26 ^
36e4e71e ^

4ea0f69a ^

36e4e71e ^




78a7d762 ^
36e4e71e ^

78a7d762 ^
36e4e71e ^


4ea0f69a ^

36e4e71e ^
bd088c49 ^
36e4e71e ^
0a32b684 ^
36e4e71e ^

f6ae504c ^
4ea0f69a ^

0a32b684 ^

4ea0f69a ^
0a32b684 ^
4ea0f69a ^


0a32b684 ^

4ea0f69a ^



36e4e71e ^
7582555b ^
36e4e71e ^
7582555b ^








36e4e71e ^
4ea0f69a ^


36e4e71e ^




4ea0f69a ^

36e4e71e ^



f6ae504c ^
4ea0f69a ^
36e4e71e ^

4ea0f69a ^

36e4e71e ^






4ea0f69a ^

306c76d8 ^






b6aff4c3 ^

306c76d8 ^
4ea0f69a ^

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
118
119
120
121
122
123
124