MCPcopy Index your code
hub / github.com/nathom/streamrip / config_open

Function config_open

streamrip/rip/cli.py:275–289  ·  view source on GitHub ↗

Open the config file in a text editor.

(ctx, vim)

Source from the content-addressed store, hash-verified

273@click.option("-v", "--vim", help="Open in (Neo)Vim", is_flag=True)
274@click.pass_context
275def config_open(ctx, vim):
276 """Open the config file in a text editor."""
277 config_path = ctx.obj["config_path"]
278
279 console.print(f"Opening file at [bold cyan]{config_path}")
280 if vim:
281 if shutil.which("nvim") is not None:
282 subprocess.run(["nvim", config_path])
283 elif shutil.which("vim") is not None:
284 subprocess.run(["vim", config_path])
285 else:
286 logger.error("Could not find nvim or vim. Using default launcher.")
287 click.launch(config_path)
288 else:
289 click.launch(config_path)
290
291
292@config.command("reset")

Callers

nothing calls this directly

Calls 1

printMethod · 0.80

Tested by

no test coverage detected