mirror of
https://github.com/searxng/searxng
synced 2024-01-01 19:24:07 +01:00
[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.
This commit is contained in:
parent
3397382754
commit
f0ca1c3483
4 changed files with 497 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue