pseek 2.5.0__tar.gz → 2.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pseek-2.5.0 → pseek-2.5.1}/PKG-INFO +28 -26
- {pseek-2.5.0 → pseek-2.5.1}/README.md +27 -25
- {pseek-2.5.0 → pseek-2.5.1}/pseek/cli.py +8 -5
- {pseek-2.5.0 → pseek-2.5.1}/pseek/parser.py +6 -11
- {pseek-2.5.0 → pseek-2.5.1}/pseek.egg-info/PKG-INFO +28 -26
- {pseek-2.5.0 → pseek-2.5.1}/pyproject.toml +1 -1
- {pseek-2.5.0 → pseek-2.5.1}/LICENSE +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/pseek/__init__.py +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/pseek/searcher.py +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/pseek/utils.py +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/pseek.egg-info/SOURCES.txt +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/pseek.egg-info/dependency_links.txt +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/pseek.egg-info/entry_points.txt +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/pseek.egg-info/requires.txt +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/pseek.egg-info/top_level.txt +0 -0
- {pseek-2.5.0 → pseek-2.5.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pseek
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.1
|
|
4
4
|
Summary: Pseek is a Python library to search files, folders, and text
|
|
5
5
|
Author-email: Arian <ariannasiri86@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -44,7 +44,9 @@ pip install pseek
|
|
|
44
44
|
```sh
|
|
45
45
|
git clone https://github.com/ArianN8610/pysearch.git
|
|
46
46
|
cd pysearch
|
|
47
|
-
|
|
47
|
+
python -m venv venv
|
|
48
|
+
[Activate venv]
|
|
49
|
+
pip install click==8.1.8 lark==1.2.2 py7zr==1.0.0 rarfile==4.2 rapidfuzz==3.13.0
|
|
48
50
|
```
|
|
49
51
|
|
|
50
52
|
## Usage
|
|
@@ -82,30 +84,30 @@ pseek "error\d+" --regex
|
|
|
82
84
|
|
|
83
85
|
## Command Options
|
|
84
86
|
|
|
85
|
-
| Option | Description
|
|
86
|
-
|
|
87
|
-
| `--path` | Base directory to search in (default: current directory `.`)
|
|
88
|
-
| `--file` | Search only in file names
|
|
89
|
-
| `--directory` | Search only in directory names
|
|
90
|
-
| `--content` | Search inside file contents
|
|
91
|
-
| `--ext`, `--exclude-ext` | Filter by file extension (e.g., `txt`, `log`)
|
|
92
|
-
| `--case-sensitive` | Make the search case-sensitive (except when `--expr` is enabled, in which case you can make it case sensitive by putting `c` before term: `c"foo"`)
|
|
93
|
-
| `--regex` | Use regular expressions to search (except when `--expr` is enabled, in which case you can make it regex by putting `r` before term: `r"foo"`)
|
|
94
|
-
| `--include`, `--exclude` | Limit search results to specific set of directories or files
|
|
95
|
-
| `--re-include`, `--re-exclude` | Limit search results to specific directories or files with regex
|
|
96
|
-
| `--word` | Match the whole word only (except when `--expr` is enabled, in which case you can make it match whole word by putting `w` before term: `w"foo"`)
|
|
97
|
-
| `--expr` | Enable to write conditions in the query. Example: `r"foo.*bar" and ("bar" or "baz") and not "qux"` (To use regex, word,
|
|
98
|
-
| `--timeout` | To stop the search after a specified period of time (Seconds)
|
|
99
|
-
| `--fuzzy` | Enable fuzzy search (Highlighting and counting matches are disabled in this mode if `--word` is not enabled to prevent the program from slowing down)
|
|
100
|
-
| `--fuzzy_level` | Similarity threshold from 0 to 99 for fuzzy search (default: `80`)
|
|
101
|
-
| `--max-size`, `--min-size` | Specify maximum and minimum sizes for files and directories
|
|
102
|
-
| `--archive` | Enable search within archive files (e.g. `zip`, `rar`, `7z`, `gz`, `bz2`, `xz`, `tar`, `tar.gz`, `tar.bz2`, `tar.xz`)
|
|
103
|
-
| `--arc-ext`, `--arc-ee` | Filter by file extension inside archive files
|
|
104
|
-
| `--arc-inc`, `--arc-exc` | Limit search results to specific set of directories or files inside archive files
|
|
105
|
-
| `--arc-max`, `--arc-min` | Specify maximum and minimum sizes for files inside archive files (It doesn't work for directories because their size is zero in archive files)
|
|
106
|
-
| `--rarfb` | Path to RAR backend tool (e.g. UnRAR.exe, ...)
|
|
107
|
-
| `--full-path` | Display full path of files and directories
|
|
108
|
-
| `--no-content` | Only display files path for content search
|
|
87
|
+
| Option | Description |
|
|
88
|
+
|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
89
|
+
| `--path` | Base directory to search in (default: current directory `.`) |
|
|
90
|
+
| `--file` | Search only in file names |
|
|
91
|
+
| `--directory` | Search only in directory names |
|
|
92
|
+
| `--content` | Search inside file contents |
|
|
93
|
+
| `--ext`, `--exclude-ext` | Filter by file extension (e.g., `txt`, `log`) |
|
|
94
|
+
| `--case-sensitive` | Make the search case-sensitive (except when `--expr` is enabled, in which case you can make it case sensitive by putting `c` before term: `c"foo"`) |
|
|
95
|
+
| `--regex` | Use regular expressions to search (except when `--expr` is enabled, in which case you can make it regex by putting `r` before term: `r"foo"`) |
|
|
96
|
+
| `--include`, `--exclude` | Limit search results to specific set of directories or files |
|
|
97
|
+
| `--re-include`, `--re-exclude` | Limit search results to specific directories or files with regex |
|
|
98
|
+
| `--word` | Match the whole word only (except when `--expr` is enabled, in which case you can make it match whole word by putting `w` before term: `w"foo"`) |
|
|
99
|
+
| `--expr` | Enable to write conditions in the query. Example: `r"foo.*bar" and ("bar" or "baz") and not "qux"` (To use regex, word, case-sensitive, and fuzzy features, you can use the prefixes `r`, `w`, `c`, and `f` before terms. Allowed modes: `r`, `c`, `w`, `f`, `rc`, `cr`, `cw`, `wc`, `cf`, `fc`, `wf`, `fw`, `cwf`, `cfw`, `wcf`, `wfc`, `fcw`, `fwc`. Examples: `r"foo.*bar"`, `wcf"Aple"`, `cr".*Foo"`, ...) |
|
|
100
|
+
| `--timeout` | To stop the search after a specified period of time (Seconds) |
|
|
101
|
+
| `--fuzzy` | Enable fuzzy search (Highlighting and counting matches are disabled in this mode if `--word` is not enabled to prevent the program from slowing down). except when `--expr` is enabled, in which case you can make it fuzzy by putting `f` before term: `f"foo"` |
|
|
102
|
+
| `--fuzzy_level` | Similarity threshold from 0 to 99 for fuzzy search (default: `80`) |
|
|
103
|
+
| `--max-size`, `--min-size` | Specify maximum and minimum sizes for files and directories |
|
|
104
|
+
| `--archive` | Enable search within archive files (e.g. `zip`, `rar`, `7z`, `gz`, `bz2`, `xz`, `tar`, `tar.gz`, `tar.bz2`, `tar.xz`) |
|
|
105
|
+
| `--arc-ext`, `--arc-ee` | Filter by file extension inside archive files |
|
|
106
|
+
| `--arc-inc`, `--arc-exc` | Limit search results to specific set of directories or files inside archive files |
|
|
107
|
+
| `--arc-max`, `--arc-min` | Specify maximum and minimum sizes for files inside archive files (It doesn't work for directories because their size is zero in archive files) |
|
|
108
|
+
| `--rarfb` | Path to RAR backend tool (e.g. UnRAR.exe, ...) |
|
|
109
|
+
| `--full-path` | Display full path of files and directories |
|
|
110
|
+
| `--no-content` | Only display files path for content search |
|
|
109
111
|
|
|
110
112
|
## Requirements
|
|
111
113
|
|
|
@@ -27,7 +27,9 @@ pip install pseek
|
|
|
27
27
|
```sh
|
|
28
28
|
git clone https://github.com/ArianN8610/pysearch.git
|
|
29
29
|
cd pysearch
|
|
30
|
-
|
|
30
|
+
python -m venv venv
|
|
31
|
+
[Activate venv]
|
|
32
|
+
pip install click==8.1.8 lark==1.2.2 py7zr==1.0.0 rarfile==4.2 rapidfuzz==3.13.0
|
|
31
33
|
```
|
|
32
34
|
|
|
33
35
|
## Usage
|
|
@@ -65,30 +67,30 @@ pseek "error\d+" --regex
|
|
|
65
67
|
|
|
66
68
|
## Command Options
|
|
67
69
|
|
|
68
|
-
| Option | Description
|
|
69
|
-
|
|
70
|
-
| `--path` | Base directory to search in (default: current directory `.`)
|
|
71
|
-
| `--file` | Search only in file names
|
|
72
|
-
| `--directory` | Search only in directory names
|
|
73
|
-
| `--content` | Search inside file contents
|
|
74
|
-
| `--ext`, `--exclude-ext` | Filter by file extension (e.g., `txt`, `log`)
|
|
75
|
-
| `--case-sensitive` | Make the search case-sensitive (except when `--expr` is enabled, in which case you can make it case sensitive by putting `c` before term: `c"foo"`)
|
|
76
|
-
| `--regex` | Use regular expressions to search (except when `--expr` is enabled, in which case you can make it regex by putting `r` before term: `r"foo"`)
|
|
77
|
-
| `--include`, `--exclude` | Limit search results to specific set of directories or files
|
|
78
|
-
| `--re-include`, `--re-exclude` | Limit search results to specific directories or files with regex
|
|
79
|
-
| `--word` | Match the whole word only (except when `--expr` is enabled, in which case you can make it match whole word by putting `w` before term: `w"foo"`)
|
|
80
|
-
| `--expr` | Enable to write conditions in the query. Example: `r"foo.*bar" and ("bar" or "baz") and not "qux"` (To use regex, word,
|
|
81
|
-
| `--timeout` | To stop the search after a specified period of time (Seconds)
|
|
82
|
-
| `--fuzzy` | Enable fuzzy search (Highlighting and counting matches are disabled in this mode if `--word` is not enabled to prevent the program from slowing down)
|
|
83
|
-
| `--fuzzy_level` | Similarity threshold from 0 to 99 for fuzzy search (default: `80`)
|
|
84
|
-
| `--max-size`, `--min-size` | Specify maximum and minimum sizes for files and directories
|
|
85
|
-
| `--archive` | Enable search within archive files (e.g. `zip`, `rar`, `7z`, `gz`, `bz2`, `xz`, `tar`, `tar.gz`, `tar.bz2`, `tar.xz`)
|
|
86
|
-
| `--arc-ext`, `--arc-ee` | Filter by file extension inside archive files
|
|
87
|
-
| `--arc-inc`, `--arc-exc` | Limit search results to specific set of directories or files inside archive files
|
|
88
|
-
| `--arc-max`, `--arc-min` | Specify maximum and minimum sizes for files inside archive files (It doesn't work for directories because their size is zero in archive files)
|
|
89
|
-
| `--rarfb` | Path to RAR backend tool (e.g. UnRAR.exe, ...)
|
|
90
|
-
| `--full-path` | Display full path of files and directories
|
|
91
|
-
| `--no-content` | Only display files path for content search
|
|
70
|
+
| Option | Description |
|
|
71
|
+
|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
72
|
+
| `--path` | Base directory to search in (default: current directory `.`) |
|
|
73
|
+
| `--file` | Search only in file names |
|
|
74
|
+
| `--directory` | Search only in directory names |
|
|
75
|
+
| `--content` | Search inside file contents |
|
|
76
|
+
| `--ext`, `--exclude-ext` | Filter by file extension (e.g., `txt`, `log`) |
|
|
77
|
+
| `--case-sensitive` | Make the search case-sensitive (except when `--expr` is enabled, in which case you can make it case sensitive by putting `c` before term: `c"foo"`) |
|
|
78
|
+
| `--regex` | Use regular expressions to search (except when `--expr` is enabled, in which case you can make it regex by putting `r` before term: `r"foo"`) |
|
|
79
|
+
| `--include`, `--exclude` | Limit search results to specific set of directories or files |
|
|
80
|
+
| `--re-include`, `--re-exclude` | Limit search results to specific directories or files with regex |
|
|
81
|
+
| `--word` | Match the whole word only (except when `--expr` is enabled, in which case you can make it match whole word by putting `w` before term: `w"foo"`) |
|
|
82
|
+
| `--expr` | Enable to write conditions in the query. Example: `r"foo.*bar" and ("bar" or "baz") and not "qux"` (To use regex, word, case-sensitive, and fuzzy features, you can use the prefixes `r`, `w`, `c`, and `f` before terms. Allowed modes: `r`, `c`, `w`, `f`, `rc`, `cr`, `cw`, `wc`, `cf`, `fc`, `wf`, `fw`, `cwf`, `cfw`, `wcf`, `wfc`, `fcw`, `fwc`. Examples: `r"foo.*bar"`, `wcf"Aple"`, `cr".*Foo"`, ...) |
|
|
83
|
+
| `--timeout` | To stop the search after a specified period of time (Seconds) |
|
|
84
|
+
| `--fuzzy` | Enable fuzzy search (Highlighting and counting matches are disabled in this mode if `--word` is not enabled to prevent the program from slowing down). except when `--expr` is enabled, in which case you can make it fuzzy by putting `f` before term: `f"foo"` |
|
|
85
|
+
| `--fuzzy_level` | Similarity threshold from 0 to 99 for fuzzy search (default: `80`) |
|
|
86
|
+
| `--max-size`, `--min-size` | Specify maximum and minimum sizes for files and directories |
|
|
87
|
+
| `--archive` | Enable search within archive files (e.g. `zip`, `rar`, `7z`, `gz`, `bz2`, `xz`, `tar`, `tar.gz`, `tar.bz2`, `tar.xz`) |
|
|
88
|
+
| `--arc-ext`, `--arc-ee` | Filter by file extension inside archive files |
|
|
89
|
+
| `--arc-inc`, `--arc-exc` | Limit search results to specific set of directories or files inside archive files |
|
|
90
|
+
| `--arc-max`, `--arc-min` | Specify maximum and minimum sizes for files inside archive files (It doesn't work for directories because their size is zero in archive files) |
|
|
91
|
+
| `--rarfb` | Path to RAR backend tool (e.g. UnRAR.exe, ...) |
|
|
92
|
+
| `--full-path` | Display full path of files and directories |
|
|
93
|
+
| `--no-content` | Only display files path for content search |
|
|
92
94
|
|
|
93
95
|
## Requirements
|
|
94
96
|
|
|
@@ -46,12 +46,15 @@ def run_search_process(file, directory, content, search_instance):
|
|
|
46
46
|
'in which case you can make it match whole word by putting w before term: w"foo")')
|
|
47
47
|
@click.option('--expr', is_flag=True,
|
|
48
48
|
help='Enable to write conditions in the query. Example: r"foo.*bar" and ("bar" or "baz") and not "qux" '
|
|
49
|
-
'(To use regex, word,
|
|
50
|
-
'you can use the prefixes r, w, and
|
|
51
|
-
'
|
|
49
|
+
'(To use regex, word, case-sensitive, and fuzzy features, '
|
|
50
|
+
'you can use the prefixes r, w, c, and f before terms. Allowed modes: '
|
|
51
|
+
'r, c, w, f, rc, cr, cw, wc, cf, fc, wf, fw, cwf, cfw, wcf, wfc, fcw, fwc. '
|
|
52
|
+
'Examples: r"foo.*bar", wcf"Aple", cr".*Foo", ...)')
|
|
52
53
|
@click.option('--timeout', type=click.INT,
|
|
53
54
|
help='To stop the search after a specified period of time (Seconds)')
|
|
54
|
-
@click.option('--fuzzy', is_flag=True, help='Enable fuzzy search (approximate matching).'
|
|
55
|
+
@click.option('--fuzzy', is_flag=True, help='Enable fuzzy search (approximate matching). '
|
|
56
|
+
'except when --expr is enabled, '
|
|
57
|
+
'in which case you can make it fuzzy by putting f before term: f"foo"')
|
|
55
58
|
@click.option('--fuzzy-level', type=click.IntRange(0, 99), default=80, show_default=True,
|
|
56
59
|
help='Similarity threshold from 0 to 99 for fuzzy search.')
|
|
57
60
|
# Extension filters
|
|
@@ -105,7 +108,7 @@ def search(query, path, file, directory, content, case_sensitive, ext, exclude_e
|
|
|
105
108
|
fg="yellow"
|
|
106
109
|
)
|
|
107
110
|
)
|
|
108
|
-
|
|
111
|
+
elif word and " " in query:
|
|
109
112
|
click.echo(
|
|
110
113
|
click.style(
|
|
111
114
|
'Warning: When using "--fuzzy" and "--word", it is better to have the query be a word and '
|
|
@@ -123,7 +123,7 @@ query_grammar = r"""
|
|
|
123
123
|
| ESCAPED_STRING -> string
|
|
124
124
|
| "(" expr ")"
|
|
125
125
|
|
|
126
|
-
PREFIXED_STRING: /(r|c|w|rc|cr|cw|wc)"([^"\\]|\\.)*"/
|
|
126
|
+
PREFIXED_STRING: /(r|c|w|f|rc|cr|cw|wc|cf|fc|wf|fw|cwf|cfw|wcf|wfc|fcw|fwc)"([^"\\]|\\.)*"/
|
|
127
127
|
|
|
128
128
|
%import common.ESCAPED_STRING
|
|
129
129
|
%import common.WS
|
|
@@ -133,9 +133,8 @@ PREFIXED_STRING: /(r|c|w|rc|cr|cw|wc)"([^"\\]|\\.)*"/
|
|
|
133
133
|
|
|
134
134
|
class TreeToExpr(Transformer):
|
|
135
135
|
"""Transform parsed tree into expression tree (ExprNode subclasses)"""
|
|
136
|
-
def __init__(self,
|
|
136
|
+
def __init__(self, fuzzy_level):
|
|
137
137
|
super().__init__()
|
|
138
|
-
self.fuzzy = fuzzy
|
|
139
138
|
self.fuzzy_level = fuzzy_level
|
|
140
139
|
|
|
141
140
|
def string(self, s):
|
|
@@ -146,8 +145,8 @@ class TreeToExpr(Transformer):
|
|
|
146
145
|
False,
|
|
147
146
|
False,
|
|
148
147
|
False,
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
False,
|
|
149
|
+
None
|
|
151
150
|
)
|
|
152
151
|
|
|
153
152
|
def prefixed_string(self, s):
|
|
@@ -160,7 +159,7 @@ class TreeToExpr(Transformer):
|
|
|
160
159
|
regex='r' in prefix,
|
|
161
160
|
whole_word='w' in prefix,
|
|
162
161
|
case_sensitive='c' in prefix,
|
|
163
|
-
fuzzy=
|
|
162
|
+
fuzzy='f' in prefix,
|
|
164
163
|
fuzzy_level=self.fuzzy_level
|
|
165
164
|
)
|
|
166
165
|
|
|
@@ -187,7 +186,7 @@ def parse_query_expression(query: str, expr, regex, whole_word, case_sensitive,
|
|
|
187
186
|
parser = Lark(query_grammar, parser="lalr")
|
|
188
187
|
try:
|
|
189
188
|
tree = parser.parse(query)
|
|
190
|
-
return TreeToExpr(
|
|
189
|
+
return TreeToExpr(fuzzy_level).transform(tree)
|
|
191
190
|
except Exception as e:
|
|
192
191
|
click.echo(click.style("Query parser error:\n\n", fg='red') + str(e))
|
|
193
192
|
sys.exit(1)
|
|
@@ -223,10 +222,6 @@ def highlight_text(expr: ExprNode, text: str, fuzzy: bool) -> str:
|
|
|
223
222
|
elif isinstance(node, NotNode):
|
|
224
223
|
collect_matches(node.child)
|
|
225
224
|
|
|
226
|
-
# If fuzzy is enabled but whole_word is False, return plain text
|
|
227
|
-
if fuzzy and isinstance(expr, TermNode) and not expr.whole_word:
|
|
228
|
-
return text
|
|
229
|
-
|
|
230
225
|
collect_matches(expr)
|
|
231
226
|
|
|
232
227
|
# Sort and merge overlapping matches (for example, if one match was inside another match)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pseek
|
|
3
|
-
Version: 2.5.
|
|
3
|
+
Version: 2.5.1
|
|
4
4
|
Summary: Pseek is a Python library to search files, folders, and text
|
|
5
5
|
Author-email: Arian <ariannasiri86@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -44,7 +44,9 @@ pip install pseek
|
|
|
44
44
|
```sh
|
|
45
45
|
git clone https://github.com/ArianN8610/pysearch.git
|
|
46
46
|
cd pysearch
|
|
47
|
-
|
|
47
|
+
python -m venv venv
|
|
48
|
+
[Activate venv]
|
|
49
|
+
pip install click==8.1.8 lark==1.2.2 py7zr==1.0.0 rarfile==4.2 rapidfuzz==3.13.0
|
|
48
50
|
```
|
|
49
51
|
|
|
50
52
|
## Usage
|
|
@@ -82,30 +84,30 @@ pseek "error\d+" --regex
|
|
|
82
84
|
|
|
83
85
|
## Command Options
|
|
84
86
|
|
|
85
|
-
| Option | Description
|
|
86
|
-
|
|
87
|
-
| `--path` | Base directory to search in (default: current directory `.`)
|
|
88
|
-
| `--file` | Search only in file names
|
|
89
|
-
| `--directory` | Search only in directory names
|
|
90
|
-
| `--content` | Search inside file contents
|
|
91
|
-
| `--ext`, `--exclude-ext` | Filter by file extension (e.g., `txt`, `log`)
|
|
92
|
-
| `--case-sensitive` | Make the search case-sensitive (except when `--expr` is enabled, in which case you can make it case sensitive by putting `c` before term: `c"foo"`)
|
|
93
|
-
| `--regex` | Use regular expressions to search (except when `--expr` is enabled, in which case you can make it regex by putting `r` before term: `r"foo"`)
|
|
94
|
-
| `--include`, `--exclude` | Limit search results to specific set of directories or files
|
|
95
|
-
| `--re-include`, `--re-exclude` | Limit search results to specific directories or files with regex
|
|
96
|
-
| `--word` | Match the whole word only (except when `--expr` is enabled, in which case you can make it match whole word by putting `w` before term: `w"foo"`)
|
|
97
|
-
| `--expr` | Enable to write conditions in the query. Example: `r"foo.*bar" and ("bar" or "baz") and not "qux"` (To use regex, word,
|
|
98
|
-
| `--timeout` | To stop the search after a specified period of time (Seconds)
|
|
99
|
-
| `--fuzzy` | Enable fuzzy search (Highlighting and counting matches are disabled in this mode if `--word` is not enabled to prevent the program from slowing down)
|
|
100
|
-
| `--fuzzy_level` | Similarity threshold from 0 to 99 for fuzzy search (default: `80`)
|
|
101
|
-
| `--max-size`, `--min-size` | Specify maximum and minimum sizes for files and directories
|
|
102
|
-
| `--archive` | Enable search within archive files (e.g. `zip`, `rar`, `7z`, `gz`, `bz2`, `xz`, `tar`, `tar.gz`, `tar.bz2`, `tar.xz`)
|
|
103
|
-
| `--arc-ext`, `--arc-ee` | Filter by file extension inside archive files
|
|
104
|
-
| `--arc-inc`, `--arc-exc` | Limit search results to specific set of directories or files inside archive files
|
|
105
|
-
| `--arc-max`, `--arc-min` | Specify maximum and minimum sizes for files inside archive files (It doesn't work for directories because their size is zero in archive files)
|
|
106
|
-
| `--rarfb` | Path to RAR backend tool (e.g. UnRAR.exe, ...)
|
|
107
|
-
| `--full-path` | Display full path of files and directories
|
|
108
|
-
| `--no-content` | Only display files path for content search
|
|
87
|
+
| Option | Description |
|
|
88
|
+
|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
89
|
+
| `--path` | Base directory to search in (default: current directory `.`) |
|
|
90
|
+
| `--file` | Search only in file names |
|
|
91
|
+
| `--directory` | Search only in directory names |
|
|
92
|
+
| `--content` | Search inside file contents |
|
|
93
|
+
| `--ext`, `--exclude-ext` | Filter by file extension (e.g., `txt`, `log`) |
|
|
94
|
+
| `--case-sensitive` | Make the search case-sensitive (except when `--expr` is enabled, in which case you can make it case sensitive by putting `c` before term: `c"foo"`) |
|
|
95
|
+
| `--regex` | Use regular expressions to search (except when `--expr` is enabled, in which case you can make it regex by putting `r` before term: `r"foo"`) |
|
|
96
|
+
| `--include`, `--exclude` | Limit search results to specific set of directories or files |
|
|
97
|
+
| `--re-include`, `--re-exclude` | Limit search results to specific directories or files with regex |
|
|
98
|
+
| `--word` | Match the whole word only (except when `--expr` is enabled, in which case you can make it match whole word by putting `w` before term: `w"foo"`) |
|
|
99
|
+
| `--expr` | Enable to write conditions in the query. Example: `r"foo.*bar" and ("bar" or "baz") and not "qux"` (To use regex, word, case-sensitive, and fuzzy features, you can use the prefixes `r`, `w`, `c`, and `f` before terms. Allowed modes: `r`, `c`, `w`, `f`, `rc`, `cr`, `cw`, `wc`, `cf`, `fc`, `wf`, `fw`, `cwf`, `cfw`, `wcf`, `wfc`, `fcw`, `fwc`. Examples: `r"foo.*bar"`, `wcf"Aple"`, `cr".*Foo"`, ...) |
|
|
100
|
+
| `--timeout` | To stop the search after a specified period of time (Seconds) |
|
|
101
|
+
| `--fuzzy` | Enable fuzzy search (Highlighting and counting matches are disabled in this mode if `--word` is not enabled to prevent the program from slowing down). except when `--expr` is enabled, in which case you can make it fuzzy by putting `f` before term: `f"foo"` |
|
|
102
|
+
| `--fuzzy_level` | Similarity threshold from 0 to 99 for fuzzy search (default: `80`) |
|
|
103
|
+
| `--max-size`, `--min-size` | Specify maximum and minimum sizes for files and directories |
|
|
104
|
+
| `--archive` | Enable search within archive files (e.g. `zip`, `rar`, `7z`, `gz`, `bz2`, `xz`, `tar`, `tar.gz`, `tar.bz2`, `tar.xz`) |
|
|
105
|
+
| `--arc-ext`, `--arc-ee` | Filter by file extension inside archive files |
|
|
106
|
+
| `--arc-inc`, `--arc-exc` | Limit search results to specific set of directories or files inside archive files |
|
|
107
|
+
| `--arc-max`, `--arc-min` | Specify maximum and minimum sizes for files inside archive files (It doesn't work for directories because their size is zero in archive files) |
|
|
108
|
+
| `--rarfb` | Path to RAR backend tool (e.g. UnRAR.exe, ...) |
|
|
109
|
+
| `--full-path` | Display full path of files and directories |
|
|
110
|
+
| `--no-content` | Only display files path for content search |
|
|
109
111
|
|
|
110
112
|
## Requirements
|
|
111
113
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|