Skip to content

fix(ps): restore --all flag to scan all containers#24

Merged
dlovell merged 1 commit into
mainfrom
fix/ps-restore-all-flag
Jun 21, 2026
Merged

fix(ps): restore --all flag to scan all containers#24
dlovell merged 1 commit into
mainfrom
fix/ps-restore-all-flag

Conversation

@dlovell

@dlovell dlovell commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • devcontainer ps and devcontainer ps --all currently produce identical output. PR fix(ps): list running project containers instead of counting claude processes #21 removed the --all branch from the ps command, after which the flag was silently consumed by shift and ignored — even though shell completions still advertise it.
  • This restores the --all branch: it scans every running Docker container and reports only those with active claude sessions. The default ps is unchanged — it still lists this project's containers (filtered by name=^${PROJECT}-dev-) with per-container session counts.
  • Kept the pre-increment fix (((++count))) from fix(ps): use pre-increment to avoid set -e crash #22 and updated the --help text. No completions change needed; they already listed ps --all.

Test plan

  • devcontainer ps — lists only this project's containers with session counts
  • devcontainer ps --all — lists all running containers (across projects) that have a claude session; differs from plain ps when other projects are running
  • devcontainer ps --all with no claude sessions anywhere — prints 0 containers running

🤖 Generated with Claude Code

PR #21 removed the `--all` branch from `devcontainer ps`, leaving the
flag silently consumed by `shift`. As a result `ps` and `ps --all`
produced identical output, even though completions still advertised
`--all`. Restore the `--all` branch so it scans every running Docker
container and reports those with active claude sessions, while the
default keeps listing only this project's containers.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@dlovell dlovell marked this pull request as ready for review June 21, 2026 13:21
@dlovell dlovell merged commit b22a65b into main Jun 21, 2026
5 checks passed
@dlovell dlovell deleted the fix/ps-restore-all-flag branch June 21, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant