From 2cb31aa8017744f5de8cbbb38082154531b19ee5 Mon Sep 17 00:00:00 2001 From: Nasser Alansari Date: Sat, 28 Mar 2026 08:50:33 +0000 Subject: [PATCH 1/9] Fix: Add new line before to open i --- src/devcode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/devcode.py b/src/devcode.py index 47fc6c5..280c1d0 100644 --- a/src/devcode.py +++ b/src/devcode.py @@ -748,7 +748,7 @@ def cmd_ps(args) -> None: if not args.interactive: return - choice = input(f"Open [1-{len(display)}]: ").strip() + choice = input(f"\nOpen [1-{len(display)}]: ").strip() try: idx = int(choice) - 1 if not (0 <= idx < len(display)): From 54298660ac7fe39584255f87ad58e5e97f19cf57 Mon Sep 17 00:00:00 2001 From: Nasser Alansari Date: Sat, 28 Mar 2026 14:04:25 +0000 Subject: [PATCH 2/9] feat: reorder open args, add settings.json config, fix missing projectpath error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - devcode open now takes [template] (template optional) - Auto-detects template from container history (running → stopped → default) - Adds settings.json (~/.config/dev-code/settings.json) replacing DEVCODE_TEMPLATE_PATH - settings.json auto-created with defaults on first run (default_template: dev-code) - DEVCODE_CONF_DIR env var overrides config directory - Errors on non-existent projectpath (bug fix) - Updates shell completion: template completes at position 3 (not 2) --- README.md | 89 ++++---- src/devcode.py | 113 ++++++++-- tests/test_dev_code.py | 477 +++++++++++++++++++++++++++++------------ 3 files changed, 489 insertions(+), 190 deletions(-) diff --git a/README.md b/README.md index 549cb58..cc17195 100644 --- a/README.md +++ b/README.md @@ -50,11 +50,11 @@ Typical Dev Container workflows involve: # Install pip install dev-code -# Create default template -devcode init +# Open a project (auto-detects template from container history, or uses default) +devcode open ~/projects/my-app -# Open a project -devcode open dev-code ~/projects/my-app +# Open with an explicit template +devcode open ~/projects/my-app dev-code # Reopen projects later devcode ps -a -i @@ -81,14 +81,7 @@ Default location: ~/.local/share/dev-code/templates/ ``` -Override search paths: - -```bash -DEVCODE_TEMPLATE_PATH=/my/templates:/team/templates -``` - -* The first path is used for writes -* Additional paths are read-only +Override search paths via `settings.json` (see [Configuration](#configuration)). --- @@ -105,14 +98,16 @@ DEVCODE_TEMPLATE_PATH=/my/templates:/team/templates ### devcode open ```bash -devcode open