feat: ls only lists running jobs, prune removes all running jobs
All checks were successful
CI / Check, test, lint (push) Successful in 31s

This commit is contained in:
2026-05-20 17:39:46 +02:00
parent e9ab6c6a0f
commit b27e92b6f7
6 changed files with 121 additions and 7 deletions

14
SPEC.md
View File

@@ -66,8 +66,10 @@ Useful for commands that need no local files (e.g. `p -n -- htop`).
```
p ls
```
List jobs across all workers. Shows: ID (short), worker, original CWD,
command, status, duration. Style inspired by `docker ps` / `lxc list`.
List **running jobs** across all workers. Pass `-a` / `--all` to also show
completed jobs (done, failed, stopped).
Shows: ID (short), worker, original CWD, command, status, duration.
Style inspired by `docker ps` / `lxc list`.
```
p attach <job-id>
@@ -100,6 +102,14 @@ p rm <job-id>
Remove a job record and its remote work directory. Refuses to remove a
running job without `--force`.
```
p prune
```
Remove all finished job records (status: done, failed, stopped) and their
remote work directories. Jobs with status `running` or `unknown` are left
untouched. Pass `--force` to also include `unknown` jobs.
Pass `--dry-run` to preview what would be removed without deleting anything.
### Worker management
```