|
@@ -107,14 +107,21 @@ class RawTextQuery(object):
|
107
|
107
|
# check if prefix is equal with engine shortcut
|
108
|
108
|
if prefix in engine_shortcuts:
|
109
|
109
|
parse_next = True
|
110
|
|
- self.engines.append({'category': 'none',
|
111
|
|
- 'name': engine_shortcuts[prefix]})
|
|
110
|
+ engine_name = engine_shortcuts[prefix]
|
|
111
|
+ if engine_name in engines:
|
|
112
|
+ for engine_category in engines[engine_name].categories:
|
|
113
|
+ self.engines.append({'category': engine_category,
|
|
114
|
+ 'name': engine_name,
|
|
115
|
+ 'from_bang': True})
|
112
|
116
|
|
113
|
117
|
# check if prefix is equal with engine name
|
114
|
118
|
elif prefix in engines:
|
115
|
119
|
parse_next = True
|
116
|
|
- self.engines.append({'category': 'none',
|
117
|
|
- 'name': prefix})
|
|
120
|
+ if prefix in engines:
|
|
121
|
+ for engine_category in engines[engine_name].categories:
|
|
122
|
+ self.engines.append({'category': engine_category,
|
|
123
|
+ 'name': engine_name,
|
|
124
|
+ 'from_bang': True})
|
118
|
125
|
|
119
|
126
|
# check if prefix is equal with categorie name
|
120
|
127
|
elif prefix in categories:
|