Skip to content

Commit 596be9f

Browse files
committed
docs(cli[flags]) Use longform flags and split multi-flag commands
why: Shortform flags (-w, -f, -S, -v) are cryptic in user-facing docs; multi-flag one-liners are hard to scan and copy-paste. what: - Replace -w with --workspace in all doc code blocks - Replace -f with --file in all doc code blocks - Replace -S with --smart-case and -v with --invert-match in search docs - Split multi-flag commands onto \-continuation lines - Update prose references to prefer longform names - Remove redundant "Short form" examples from fmt.md
1 parent 76944a1 commit 596be9f

17 files changed

Lines changed: 114 additions & 70 deletions

CHANGES

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@ Import a user's repositories:
4444

4545
```console
4646
$ vcspull import github torvalds \
47-
-w ~/repos/linux \
47+
--workspace ~/repos/linux \
4848
--mode user
4949
```
5050

5151
Import an organization's repositories:
5252

5353
```console
5454
$ vcspull import github django \
55-
-w ~/study/python \
55+
--workspace ~/study/python \
5656
--mode org
5757
```
5858

5959
Search and import repositories:
6060

6161
```console
6262
$ vcspull import github "machine learning" \
63-
-w ~/ml-repos \
63+
--workspace ~/ml-repos \
6464
--mode search \
6565
--min-stars 1000
6666
```
@@ -69,23 +69,23 @@ Use with self-hosted GitLab:
6969

7070
```console
7171
$ vcspull import gitlab myuser \
72-
-w ~/work \
72+
--workspace ~/work \
7373
--url https://gitlab.company.com
7474
```
7575

7676
Import from AWS CodeCommit:
7777

7878
```console
7979
$ vcspull import codecommit \
80-
-w ~/work/aws \
80+
--workspace ~/work/aws \
8181
--region us-east-1
8282
```
8383

8484
Preview without writing (dry run):
8585

8686
```console
8787
$ vcspull import codeberg user \
88-
-w ~/oss \
88+
--workspace ~/oss \
8989
--dry-run
9090
```
9191

@@ -107,15 +107,15 @@ SSH (default):
107107

108108
```console
109109
$ vcspull import github torvalds \
110-
-w ~/repos/linux \
110+
--workspace ~/repos/linux \
111111
--mode user
112112
```
113113

114114
Use `--https` for HTTPS clone URLs:
115115

116116
```console
117117
$ vcspull import github torvalds \
118-
-w ~/repos/linux \
118+
--workspace ~/repos/linux \
119119
--mode user \
120120
--https
121121
```
@@ -127,7 +127,7 @@ under the workspace root by default:
127127

128128
```console
129129
$ vcspull import gitlab vcs-python-group-test \
130-
-w ~/projects/python \
130+
--workspace ~/projects/python \
131131
--mode org
132132
```
133133

@@ -142,7 +142,7 @@ workspace root:
142142

143143
```console
144144
$ vcspull import gitlab vcs-python-group-test \
145-
-w ~/projects/python \
145+
--workspace ~/projects/python \
146146
--mode org \
147147
--flatten-groups
148148
```

README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ $ vcspull discover ~/code --recursive
119119
```
120120

121121
The scan shows each repository before import unless you opt into `--yes`. Add
122-
`-w ~/code/` to pin the resulting workspace root or `-f` to write somewhere other
122+
`--workspace ~/code/` to pin the resulting workspace root or `-f/--file` to write somewhere other
123123
than the default `~/.vcspull.yaml`. Duplicate workspace roots are merged by
124124
default; include `--no-merge` to keep them separate while you review the log.
125125

@@ -129,11 +129,15 @@ Pull repository lists from GitHub, GitLab, Codeberg, Gitea, Forgejo, or AWS
129129
CodeCommit directly into your configuration:
130130

131131
```console
132-
$ vcspull import github myuser -w ~/code/ --mode user
132+
$ vcspull import github myuser \
133+
--workspace ~/code/ \
134+
--mode user
133135
```
134136

135137
```console
136-
$ vcspull import gitlab my-group -w ~/work/ --mode org
138+
$ vcspull import gitlab my-group \
139+
--workspace ~/work/ \
140+
--mode org
137141
```
138142

139143
Use `--dry-run` to preview changes, `--https` for HTTPS clone URLs, and
@@ -182,7 +186,9 @@ After importing or editing by hand, run the formatter to tidy up keys, merge
182186
duplicate workspace sections, and keep entries sorted:
183187

184188
```console
185-
$ vcspull fmt -f ~/.vcspull.yaml --write
189+
$ vcspull fmt \
190+
--file ~/.vcspull.yaml \
191+
--write
186192
```
187193

188194
Use `vcspull fmt --all --write` to format every YAML file that vcspull can
@@ -223,7 +229,7 @@ or svn project with a git dependency:
223229
Clone / update repos via config file:
224230

225231
```console
226-
$ vcspull sync -f external_deps.yaml '*'
232+
$ vcspull sync --file external_deps.yaml '*'
227233
```
228234

229235
See the [Quickstart](https://vcspull.git-pull.com/quickstart.html) for

docs/cli/add.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ vcspull searches for configuration files in this order:
9898
Specify a file explicitly with `-f/--file`:
9999

100100
```console
101-
$ vcspull add ~/study/python/pytest-docker -f ~/configs/python.yaml
101+
$ vcspull add ~/study/python/pytest-docker \
102+
--file ~/configs/python.yaml
102103
```
103104

104105
## Handling duplicates
@@ -122,7 +123,7 @@ by `vcspull add`:
122123

123124
```diff
124125
- $ vcspull import flask https://github.com/pallets/flask.git -c ~/.vcspull.yaml
125-
+ $ vcspull add ~/code/flask --url https://github.com/pallets/flask.git -f ~/.vcspull.yaml
126+
+ $ vcspull add ~/code/flask --url https://github.com/pallets/flask.git --file ~/.vcspull.yaml
126127
```
127128

128129
Key differences:

docs/cli/discover.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ $ vcspull discover ~ --recursive --workspace-root ~/code/ --yes
129129
Specify a custom config file with `-f/--file`:
130130

131131
```console
132-
$ vcspull discover ~/company --recursive -f ~/company/.vcspull.yaml
132+
$ vcspull discover ~/company \
133+
--recursive \
134+
--file ~/company/.vcspull.yaml
133135
```
134136

135137
If the config file doesn't exist, it will be created.
@@ -195,7 +197,7 @@ Scan to specific config:
195197
$ vcspull discover ~/company/repos \
196198
--recursive \
197199
--yes \
198-
-f ~/company/.vcspull.yaml
200+
--file ~/company/.vcspull.yaml
199201
```
200202

201203
## After discovering repositories
@@ -229,7 +231,7 @@ If you previously used `vcspull import --scan`:
229231

230232
```diff
231233
- $ vcspull import --scan ~/code --recursive -c ~/.vcspull.yaml --yes
232-
+ $ vcspull discover ~/code --recursive -f ~/.vcspull.yaml --yes
234+
+ $ vcspull discover ~/code --recursive --file ~/.vcspull.yaml --yes
233235
```
234236

235237
Changes:
@@ -273,7 +275,7 @@ $ vcspull discover ~/projects --recursive --yes
273275
```console
274276
$ vcspull discover ~/company \
275277
--recursive \
276-
-f ~/company/.vcspull.yaml \
278+
--file ~/company/.vcspull.yaml \
277279
--workspace-root ~/work/ \
278280
--yes
279281
```

docs/cli/fmt.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,12 @@ Run the formatter in dry-run mode first to preview the adjustments:
5959
$ vcspull fmt --file ~/.vcspull.yaml
6060
```
6161

62-
Then add `--write` (or `-w`) to persist them back to disk:
62+
Then add `--write` to persist them back to disk:
6363

6464
```console
65-
$ vcspull fmt --file ~/.vcspull.yaml --write
66-
```
67-
68-
Short form for preview:
69-
70-
```console
71-
$ vcspull fmt -f ~/.vcspull.yaml
72-
```
73-
74-
Short form to apply:
75-
76-
```console
77-
$ vcspull fmt -f ~/.vcspull.yaml -w
65+
$ vcspull fmt \
66+
--file ~/.vcspull.yaml \
67+
--write
7868
```
7969

8070
Use `--all` to iterate over the default search locations: the current working

docs/cli/import/codeberg.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ $ export CODEBERG_TOKEN=...
3030
Then import:
3131

3232
```console
33-
$ vcspull import codeberg myuser -w ~/code/
33+
$ vcspull import codeberg myuser --workspace ~/code/
3434
```

docs/cli/import/codecommit.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ CodeCommit does not require a target argument. Use `--region` and `--profile`
2020
to select the AWS environment:
2121

2222
```console
23-
$ vcspull import codecommit -w ~/code/ --region us-east-1 --profile work
23+
$ vcspull import codecommit \
24+
--workspace ~/code/ \
25+
--region us-east-1 \
26+
--profile work
2427
```
2528

2629
## Authentication
@@ -41,5 +44,7 @@ $ aws configure
4144
Then import:
4245

4346
```console
44-
$ vcspull import codecommit -w ~/code/ --region us-east-1
47+
$ vcspull import codecommit \
48+
--workspace ~/code/ \
49+
--region us-east-1
4550
```

docs/cli/import/forgejo.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@ $ export FORGEJO_TOKEN=...
3131
Then import:
3232

3333
```console
34-
$ vcspull import forgejo myuser -w ~/code/ --url https://forgejo.example.com
34+
$ vcspull import forgejo myuser \
35+
--workspace ~/code/ \
36+
--url https://forgejo.example.com
3537
```

docs/cli/import/gitea.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@ $ export GITEA_TOKEN=...
3030
Then import:
3131

3232
```console
33-
$ vcspull import gitea myuser -w ~/code/ --url https://git.example.com
33+
$ vcspull import gitea myuser \
34+
--workspace ~/code/ \
35+
--url https://git.example.com
3436
```

docs/cli/import/github.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ $ export GITHUB_TOKEN=ghp_...
3434
Then import:
3535

3636
```console
37-
$ vcspull import gh myuser -w ~/code/
37+
$ vcspull import gh myuser --workspace ~/code/
3838
```

0 commit comments

Comments
 (0)