diff options
author | Noémi Ványi <kvch@users.noreply.github.com> | 2020-09-08 09:51:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 09:51:53 +0200 |
commit | f0ca1c34833e2c0c79af68e699e646d77167a269 (patch) | |
tree | ddd94c298ee654f94b8fee8cc53c293efb34455e /searx/settings.yml | |
parent | 339738275446dc185e761bdc3f4714cf29d33fd8 (diff) | |
download | searxng-f0ca1c34833e2c0c79af68e699e646d77167a269.tar.gz searxng-f0ca1c34833e2c0c79af68e699e646d77167a269.zip |
[enh] Add command line engines: git grep, find, etc. (#2128)
A new "base" engine called command is introduced. It is the foundation for all command line engines for now.
You can use this engine to create your own command line engine.
Add some engines (commented out to make sure no one enables anything accidentally):
* git grep: This engine lets you grep in the searx repo.
* locate: If locate is installed and initialized, you can search on the FS.
* find: You can find files with a specific name from where you started searx.
* pattern search in files: This engine utilizes the command fgrep.
* regex search in files: This engine runs `grep` to find a file based on its contents.
Diffstat (limited to 'searx/settings.yml')
-rw-r--r-- | searx/settings.yml | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/searx/settings.yml b/searx/settings.yml index d6ea53177..9140522c4 100644 --- a/searx/settings.yml +++ b/searx/settings.yml @@ -920,6 +920,77 @@ engines: # shortcut : uw # base_url : 'http://doc.ubuntu-fr.org' +# Be careful when enabling this engine if you are +# running a public instance. Do not expose any sensitive +# information. You can restrict access by configuring a list +# of access tokens under tokens. +# - name: git grep +# engine: command +# command: ['git', 'grep', '{{QUERY}}'] +# shortcut: gg +# tokens: [] +# disabled: True +# delimiter: +# chars: ':' +# keys: ['filepath', 'code'] + +# Be careful when enabling this engine if you are +# running a public instance. Do not expose any sensitive +# information. You can restrict access by configuring a list +# of access tokens under tokens. +# - name: locate +# engine: command +# command: ['locate', '{{QUERY}}'] +# shortcut: loc +# tokens: [] +# disabled: True +# delimiter: +# chars: ' ' +# keys: ['line'] + +# Be careful when enabling this engine if you are +# running a public instance. Do not expose any sensitive +# information. You can restrict access by configuring a list +# of access tokens under tokens. +# - name: find +# engine: command +# command: ['find', '.', '-name', '{{QUERY}}'] +# query_type: path +# shortcut: fnd +# tokens: [] +# disabled: True +# delimiter: +# chars: ' ' +# keys: ['line'] + +# Be careful when enabling this engine if you are +# running a public instance. Do not expose any sensitive +# information. You can restrict access by configuring a list +# of access tokens under tokens. +# - name: pattern search in files +# engine: command +# command: ['fgrep', '{{QUERY}}'] +# shortcut: fgr +# tokens: [] +# disabled: True +# delimiter: +# chars: ' ' +# keys: ['line'] + +# Be careful when enabling this engine if you are +# running a public instance. Do not expose any sensitive +# information. You can restrict access by configuring a list +# of access tokens under tokens. +# - name: regex search in files +# engine: command +# command: ['grep', '{{QUERY}}'] +# shortcut: gr +# tokens: [] +# disabled: True +# delimiter: +# chars: ' ' +# keys: ['line'] + locales: en : English ar : العَرَبِيَّة (Arabic) |