From 509a78d1eb154a6d514c891376d13f3caf4ee230 Mon Sep 17 00:00:00 2001 From: Daniel Copley Date: Thu, 13 Mar 2025 20:14:01 -0500 Subject: [PATCH] add hatch config edit command --- src/hatch/cli/config/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/hatch/cli/config/__init__.py b/src/hatch/cli/config/__init__.py index f5eec260a..ec3b4b124 100644 --- a/src/hatch/cli/config/__init__.py +++ b/src/hatch/cli/config/__init__.py @@ -8,6 +8,13 @@ def config(): pass +@config.command(short_help='Open the config file in your configured terminal editor') +@click.pass_obj +def edit(app): + """Open the config file in your configured terminal editor.""" + click.edit(filename=str(app.config_file.path)) + + @config.command(short_help='Open the config location in your file manager') @click.pass_obj def explore(app):