fix: cd to .plan dir before opening in editor.

This commit is contained in:
GitMatt 2025-01-19 12:10:33 -08:00
parent c801cf400c
commit 02dde14630
1 changed files with 1 additions and 0 deletions

View File

@ -19,4 +19,5 @@ def open(plan: Path):
with plan.open("w") as f: with plan.open("w") as f:
f.write(default()) f.write(default())
editor = os.getenv("EDITOR", "nvim") editor = os.getenv("EDITOR", "nvim")
os.chdir(Path().home() / ".plan")
subprocess.run([editor, str(plan)]) subprocess.run([editor, str(plan)])