Search for plugins
(query: str)
| 255 | @plug.command() |
| 256 | @click.argument("query") |
| 257 | def search(query: str) -> None: |
| 258 | """Search for plugins""" |
| 259 | base_path = _get_data_path() |
| 260 | plugins = build_plug_list(base_path / "plugins") |
| 261 | |
| 262 | matched_plugins = [ |
| 263 | p |
| 264 | for p in plugins |
| 265 | if query.lower() in p["name"].lower() |
| 266 | or query.lower() in p["desc"].lower() |
| 267 | or query.lower() in p["author"].lower() |
| 268 | ] |
| 269 | |
| 270 | if not matched_plugins: |
| 271 | click.echo(f"No plugins matching '{query}' found") |
| 272 | return |
| 273 | |
| 274 | display_plugins(matched_plugins, f"Search results: '{query}'", "cyan") |
no test coverage detected