Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ what:

When writing documentation (README, CHANGES, docs/), follow these rules for code blocks:

**One command per code block.** This makes commands individually copyable.
**One command per code block.** This makes commands individually copyable. For sequential commands, either use separate code blocks or chain them with `&&` or `;` and `\` continuations (keeping it one logical command).

**Put explanations outside the code block**, not as comments inside.

Expand Down Expand Up @@ -429,6 +429,42 @@ $ vcspull search django
$ vcspull search "name:flask"
```

### Shell Command Formatting

These rules apply to shell commands in documentation (README, CHANGES, docs/), **not** to Python doctests.

**Use `console` language tag with `$ ` prefix.** This distinguishes interactive commands from scripts and enables prompt-aware copy in many terminals.

Good:

```console
$ uv run pytest
```

Bad:

```bash
uv run pytest
```

**Split long commands with `\` for readability.** Each flag or flag+value pair gets its own continuation line, indented. Positional parameters go on the final line.

Good:

```console
$ pipx install \
--suffix=@next \
--pip-args '\--pre' \
--force \
'vcspull'
```

Bad:

```console
$ pipx install --suffix=@next --pip-args '\--pre' --force 'vcspull'
```

**Prefer longform flags** — use `--workspace` not `-w`, `--file` not `-f`.

**Split multi-flag commands** — when a command has 2+ flags/options, place each on its own `\`-continuation line, indented by 4 spaces.
Expand Down
16 changes: 10 additions & 6 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ $ pip install --user --upgrade --pre vcspull
[pipx](https://pypa.github.io/pipx/docs/):

```console
$ pipx install --suffix=@next 'vcspull' --pip-args '\--pre' --force
$ pipx install \
--suffix=@next \
--pip-args '\--pre' \
--force \
'vcspull'
// Usage: vcspull@next sync [config]
```

Expand Down Expand Up @@ -948,7 +952,7 @@ This release modernizes the vcspull CLI to align with DevOps tool conventions (T

#### Migration Guide (#472)

```bash
```
# Old → New
vcspull import NAME URL → vcspull add NAME URL
vcspull import --scan DIR → vcspull discover DIR
Expand Down Expand Up @@ -1157,14 +1161,14 @@ _Maintenance only, no bug fixes or new features_

via ruff v0.3.4, all automated lint fixes, including unsafe and previews were applied:

```sh
ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; ruff format .
```console
$ ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; ruff format .
```

Branches were treated with:

```sh
git rebase \
```console
$ git rebase \
--strategy-option=theirs \
--exec 'poetry run ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; poetry run ruff format .; git add src tests; git commit --amend --no-edit' \
origin/master
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ for CI/CD:
$ vcspull sync --dry-run "*"
$ vcspull sync --dry-run --show-unchanged "workspace-*"
$ vcspull sync --dry-run --json "*" | jq '.summary'
$ vcspull sync --dry-run --ndjson "*" | jq --slurp 'map(select(.type == "summary"))'
$ vcspull sync --dry-run --ndjson "*" \
| jq --slurp 'map(select(.type == "summary"))'
```

Dry runs stream a progress line when stdout is a TTY, then print a concise plan
Expand Down
12 changes: 6 additions & 6 deletions docs/cli/completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@ $ uvx shtab

:::{tab} bash

```bash
shtab --shell=bash -u vcspull.cli.create_parser \
```console
$ shtab --shell=bash -u vcspull.cli.create_parser \
| sudo tee "$BASH_COMPLETION_COMPAT_DIR"/VCSPULL
```

:::

:::{tab} zsh

```zsh
shtab --shell=zsh -u vcspull.cli.create_parser \
```console
$ shtab --shell=zsh -u vcspull.cli.create_parser \
| sudo tee /usr/local/share/zsh/site-functions/_VCSPULL
```

:::

:::{tab} tcsh

```zsh
shtab --shell=tcsh -u vcspull.cli.create_parser \
```console
$ shtab --shell=tcsh -u vcspull.cli.create_parser \
| sudo tee /etc/profile.d/VCSPULL.completion.csh
```

Expand Down
10 changes: 7 additions & 3 deletions docs/cli/status.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ Each status entry includes:
Filter with [jq] to find missing repositories:

```console
$ vcspull status --json | jq '.[] | select(.reason == "status" and .exists == false)'
$ vcspull status --json \
| jq '.[] | select(.reason == "status" and .exists == false)'
```

Or extract just the summary:
Expand Down Expand Up @@ -160,13 +161,16 @@ $ vcspull status --ndjson | grep '"exists":false' | jq -r '.name'
Monitor missing repositories:

```console
$ vcspull status --json | jq -r '.[] | select(.reason == "status" and .exists == false) | .name'
$ vcspull status --json \
| jq -r '.[] | select(.reason == "status" and .exists == false) | .name'
```

Check which repositories need syncing:

```console
$ vcspull status --json | jq -r '.[] | select(.reason == "status" and .exists == false) | .name' | xargs vcspull sync
$ vcspull status --json \
| jq -r '.[] | select(.reason == "status" and .exists == false) | .name' \
| xargs vcspull sync
```

Generate reports:
Expand Down
Loading