diff options
author | hut <hut@lavabit.com> | 2013-02-25 05:14:30 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2013-02-25 05:21:35 +0100 |
commit | 5ecfa129a79a3e9a54151037d9c80a650a2c9999 (patch) | |
tree | 7619973f3624154f9d53627d03363b541e4819c7 | |
parent | 0c7c036c679eb483ed152dfd72fcc60f87673c74 (diff) | |
download | ranger-5ecfa129a79a3e9a54151037d9c80a650a2c9999.tar.gz |
commands.scout: added PERM_FILTER flag
-rw-r--r-- | ranger/config/commands.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index 290fcb13..fa79d487 100644 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -1050,6 +1050,7 @@ class scout(Command): SM_LETTERSKIP = 'l' MARK = 'm' UNMARK = 'M' + PERM_FILTER = 'p' SM_REGEX = 'r' SMART_CASE = 's' AS_YOU_TYPE = 't' @@ -1080,6 +1081,9 @@ class scout(Command): if regex.search(f.basename): thisdir.mark_item(f, value) + if self.PERM_FILTER in flags: + thisdir.filter = regex if pattern else None + # clean up: self.cancel() @@ -1105,6 +1109,9 @@ class scout(Command): asyoutype = self.AS_YOU_TYPE in self.flags if self.FILTER in self.flags: self.fm.thisdir.temporary_filter = self._build_regex() + if self.PERM_FILTER in self.flags and asyoutype: + self.fm.thisdir.filter = self._build_regex() + if self.FILTER in self.flags or self.PERM_FILTER in self.flags: self.fm.thisdir.load_content(schedule=False) if self._count(move=asyoutype) == 1 and self.AUTO_OPEN in self.flags: return True |