Skip to content

Commit 93e52df

Browse files
authored
Merge branch 'main' into add-lore-page
2 parents 311fa84 + b06880d commit 93e52df

6 files changed

Lines changed: 110 additions & 1 deletion

File tree

contributing-guides/style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ In general, placeholders should make it as intuitive as possible to figure out h
410410

411411
- If a particular extension is expected for the file, append it.
412412
- If the extension represents the most common format but the command accepts related variations (such as multi-volume `.r00` or `.part1.rar` archives), keep it **inside** the placeholder: `unrar x {{path/to/archive.rar}}`.
413-
- If the command strictly requires one specific extension and no others to function, keep the extension **outside** the placeholder to indicate it is mandatory: `java -jar {{path/to/filename}}.jar`.
413+
- If the command strictly requires one specific extension and no others to function or if it always produces that type of file despite the provided extension, keep the extension **outside** the placeholder to indicate it is mandatory: `java -jar {{path/to/filename}}.jar`.
414414
- In case a generic extension is needed, use `{{.ext}}`, but **only** if an extension is required.
415415
- For instance, in `find.md`'s example "Find files by extension" (`find {{path/to/root}} -name '{{*.ext}}'`), using `{{*.ext}}` explains the command without being unnecessarily specific.
416416
- In `wc -l {{path/to/file}}`, using `{{path/to/file}}` (without an extension) is sufficient.

pages/common/jj-file-annotate.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# jj file annotate
2+
3+
> Show the source change for each line of a target file in a `jj` repository.
4+
> More information: <https://docs.jj-vcs.dev/latest/cli-reference/#jj-file-annotate>.
5+
6+
- Annotate a file line by line in the working copy:
7+
8+
`jj file annotate {{path/to/file}}`
9+
10+
- Annotate a file starting at a specific revision:
11+
12+
`jj file annotate {{[-r|--revision]}} {{revision}} {{path/to/file}}`
13+
14+
- Annotate a file using a custom template:
15+
16+
`jj file annotate {{[-T|--template]}} "{{template}}" {{path/to/file}}`

pages/common/jj-file-list.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# jj file list
2+
3+
> List files in a revision of a `jj` repository.
4+
> More information: <https://docs.jj-vcs.dev/latest/cli-reference/#jj-file-list>.
5+
6+
- List all files in the current working copy:
7+
8+
`jj file list`
9+
10+
- List all files in a specific revision:
11+
12+
`jj file list {{[-r|--revision]}} {{revision}}`
13+
14+
- List files matching a specific prefix or path:
15+
16+
`jj file list {{path/to/directory}}`
17+
18+
- List files rendered using a custom template:
19+
20+
`jj file list {{[-T|--template]}} "{{template}}"`

pages/common/jj-file-search.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# jj file search
2+
3+
> Search for content in files in a `jj` repository.
4+
> More information: <https://docs.jj-vcs.dev/latest/cli-reference/#jj-file-search>.
5+
6+
- Search for files containing a `regex` in the working copy:
7+
8+
`jj file search {{[-p|--pattern]}} "{{regex}}"`
9+
10+
- Search for files containing a glob pattern:
11+
12+
`jj file search {{[-p|--pattern]}} "{{glob:*pattern*}}"`
13+
14+
- Search for content in files in a specific revision:
15+
16+
`jj file search {{[-r|--revision]}} {{revision}} {{[-p|--pattern]}} "{{pattern}}"`
17+
18+
- Search only within specific paths or files:
19+
20+
`jj file search {{[-p|--pattern]}} "{{pattern}}" {{path/to/file_or_directory}}`

pages/common/jj-file-show.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# jj file show
2+
3+
> Print contents of files in a revision of a `jj` repository.
4+
> More information: <https://docs.jj-vcs.dev/latest/cli-reference/#jj-file-show>.
5+
6+
- Print the contents of a file in the working copy:
7+
8+
`jj file show {{path/to/file}}`
9+
10+
- Print the contents of a file in a specific revision:
11+
12+
`jj file show {{[-r|--revision]}} {{revision}} {{path/to/file}}`
13+
14+
- Print all files under a directory recursively:
15+
16+
`jj file show {{path/to/directory}}`
17+
18+
- Print file metadata using a custom template:
19+
20+
`jj file show {{[-T|--template]}} "{{template}}" {{path/to/file}}`

pages/common/jj-file.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# jj file
2+
3+
> Manage and inspect files in a `jj` repository.
4+
> Some subcommands such as `annotate`, `list`, `search`, `show` have their own usage documentation.
5+
> More information: <https://docs.jj-vcs.dev/latest/cli-reference/#jj-file>.
6+
7+
- List files tracked in the working copy:
8+
9+
`jj file list`
10+
11+
- Print the contents of a file in the working copy:
12+
13+
`jj file show {{path/to/file}}`
14+
15+
- Search for a pattern across tracked files:
16+
17+
`jj file search {{[-p|--pattern]}} "{{pattern}}"`
18+
19+
- Show line-by-line source change annotation for a file:
20+
21+
`jj file annotate {{path/to/file}}`
22+
23+
- Track specified paths in the working copy:
24+
25+
`jj file track {{path/to/file_or_directory}}`
26+
27+
- Stop tracking specified paths in the working copy:
28+
29+
`jj file untrack {{path/to/file_or_directory}}`
30+
31+
- Set or remove the executable bit for a file:
32+
33+
`jj file chmod {{[-x|--executable]}} {{path/to/file}}`

0 commit comments

Comments
 (0)