summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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