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
-0400 committer Ben Morrison <ben@gbmor.dev> 2019-05-13 03:52:15 -0400 fixed viper config parsing resulting in build errors' href='/gbmor/getwtxt/commit/types.go?h=v0.2.4&id=f06a2d6126bed22d38b506e1edc8822386a7cc33'>f06a2d6 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21