More work on choose files kitten

This commit is contained in:
Kovid Goyal
2025-06-19 11:24:21 +05:30
parent bbdee7efdf
commit 9de6bfbbd7
4 changed files with 70 additions and 163 deletions

View File

@@ -17,17 +17,6 @@ opt = definition.add_option
map = definition.add_map
mma = definition.add_mouse_map
agr('scan', 'Scanning the filesystem')
opt('+modify_score', r'(^|/)\.[^/]+(/|$) *= 0.1', add_to_default=True, long_text='''
Modify the score of items matching the specified regular expression (matches against the absolute path).
Can be used to make certain files and directories less or more prominent in the results.
Can be specified multiple times. The default includes rules to reduce the score of hidden items and
items in some well known cache folder names. Only applies when some actual search expression is provided.
The syntax is :code:`regular-expression operator value`. Supported operators are: :code:`*=, +=, -=, /=`.
''')
opt('+modify_score', '(^|/)__pycache__(/|$) *= 0.1', add_to_default=True)
egr()
def main(args: list[str]) -> None:
raise SystemExit('This must be run as kitten choose-files')