1 |
Since search strings containing a slash do no work unless category |
2 |
match mode is enabled, use slash to auto-detect category match mode, |
3 |
so that users do not have to prefix the search string with the special |
4 |
@ symbol. |
5 |
|
6 |
Bug: https://bugs.gentoo.org/647940 |
7 |
--- |
8 |
pym/_emerge/search.py | 4 ++++ |
9 |
1 file changed, 4 insertions(+) |
10 |
|
11 |
diff --git a/pym/_emerge/search.py b/pym/_emerge/search.py |
12 |
index 36897fb15..eb52b2ca3 100644 |
13 |
--- a/pym/_emerge/search.py |
14 |
+++ b/pym/_emerge/search.py |
15 |
@@ -256,6 +256,10 @@ class search(object): |
16 |
if self.searchkey.startswith('@'): |
17 |
match_category = 1 |
18 |
self.searchkey = self.searchkey[1:] |
19 |
+ # Auto-detect category match mode (@ symbol can be deprecated |
20 |
+ # after this is available in a stable version of portage). |
21 |
+ if '/' in self.searchkey: |
22 |
+ match_category = 1 |
23 |
fuzzy = False |
24 |
if regexsearch: |
25 |
self.searchre=re.compile(self.searchkey,re.I) |
26 |
-- |
27 |
2.13.6 |