feat: add category help to pos dispatcher (pos <category> --help)
This commit is contained in:
@@ -458,7 +458,7 @@ Use conventional prefixes: `feat:`, `fix:`, `docs:`, `refactor:`, `chore:`
|
||||
| `bin/flag-set` | 21 | Set a flag (optionally with a value) |
|
||||
| `bin/flag-clear` | 21 | Unset a flag |
|
||||
| `features/autostart.sh` | 14 | Boot-time feature (moved from `bin/`, flag-gated service) |
|
||||
| `bin/pos` | 153 | CLI dispatcher with smart arg matching + logging |
|
||||
| `bin/pos` | 191 | CLI dispatcher with smart arg matching + logging + category help |
|
||||
| `bin/pos-docker-compose` | 363 | Largest script — full compose management |
|
||||
| `bin/pos-system-firewall` | 284 | Interactive UFW manager |
|
||||
| `bin/pos-system-backup` | 115 | Encrypted folder snapshots: path mode + `--service` (`/srv`, `~/srv` picker), tar + gpg AES-256 |
|
||||
|
||||
+2
-1
@@ -49,7 +49,7 @@ pos docker compose up jellyfin
|
||||
|
||||
All non-interactive commands log to `~/.local/share/linux_post_install/logs/`.
|
||||
|
||||
`pos help <full command>` shows a tool's help, e.g. `pos help communication telegram` (all words joined with dashes → `pos-communication-telegram --help`).
|
||||
`pos help <full command>` shows a tool's help, e.g. `pos help communication telegram` (all words joined with dashes → `pos-communication-telegram --help`). `pos <category>` or `pos <category> --help` shows a category's subcommands (derived from the `pos-<category>-*` filenames in `bin/` — no script execution, so it works even for root-only/interactive tools like `system-firewall`).
|
||||
|
||||
**When adding a command, `bin/pos` itself has two things to keep in sync:**
|
||||
|
||||
@@ -159,6 +159,7 @@ bash -n bin/your-tool
|
||||
shellcheck bin/your-tool
|
||||
./bin/your-tool --help
|
||||
bin/pos help <full command> # confirm dispatch works
|
||||
bin/pos <category> --help # confirm category listing includes the new tool (first tool in a new category)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ tries pos-docker-compose-up (not found)
|
||||
tries pos-docker-compose (found) → runs with args "up jellyfin"
|
||||
```
|
||||
|
||||
`pos help <full command>` runs that tool's `--help` (e.g. `pos help communication telegram`, `pos help docker compose` — the words are joined with dashes). Running `pos` with no args prints the built-in usage text (which doubles as the category cheat-sheet).
|
||||
`pos help <full command>` runs that tool's `--help` (e.g. `pos help communication telegram`, `pos help docker compose` — the words are joined with dashes). `pos <category>` and `pos <category> --help` list that category's subcommands (derived from `bin/pos-<category>-*` filenames, no script execution). Running `pos` with no args prints the built-in usage text (which doubles as the category cheat-sheet).
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user