Skip to content

Commit b1b11e5

Browse files
committed
Update man pages
1 parent 9505dd8 commit b1b11e5

File tree

1 file changed

+55
-38
lines changed

1 file changed

+55
-38
lines changed

jet.1

+55-38
Original file line numberDiff line numberDiff line change
@@ -6,64 +6,81 @@
66
jet \- Just Edit Text
77

88
.SH SYNOPSIS
9-
.B jet [OPTIONS] "pattern" "replacement" input-files...
9+
.B jet [OPTIONS] pattern replacement input-files...
1010
.br
11-
.B jet [OPTIONS] -e "pattern1" "replacement1" -e "pattern2" "replacement2" input-files...
11+
.B jet [OPTIONS] -e pattern1 replacement1 -e pattern2 replacement2 input-files...
1212

1313
.SH DESCRIPTION
1414
Jet is a fast and intuitive command-line tool for find and replace operations.
1515
.P
16-
It replaces all occurrences of the specified regular expression pattern with the provided replacement text.
16+
It replaces all occurrences of the specified regular expression patterns with the provided replacement text.
1717
.P
18-
Jet can process single files or entire directories specified in the command line.
18+
Jet can process single files or entire directories specified on the command line.
1919
.P
20-
When given a directory, jet descends into the directory tree and recursively finds and replaces matches in all files.
20+
When given a directory, Jet descends into the directory tree and recursively finds and replaces matches in all files.
2121

2222
.SH OPTIONS
23-
.B "-p"
24-
Print the output to stdout instead of writing each file.
23+
.TP
24+
.B \-p
25+
Print to stdout instead of modifying files.
2526

26-
.B "-v"
27-
Enable verbose mode to explain the actions being performed.
27+
.TP
28+
.B \-v
29+
Enable verbose mode; explain what is being done.
2830

29-
.B "-g string"
30-
Add a glob pattern that file names must match to be edited.
31+
.TP
32+
.B \-g \fIglob-pattern\fR
33+
Only process files matching the given glob pattern.
3134

32-
.B "-a"
33-
Include hidden files (those starting with a dot).
35+
.TP
36+
.B \-a
37+
Include hidden files (those starting with a dot).
3438

35-
.B "-l int"
36-
Set the maximum depth for directory tree processing (default -1 for unlimited).
39+
.TP
40+
.B \-l \fIint\fR
41+
Maximum depth for directory traversal.
3742

38-
.B "-e string"
39-
Specify two arguments per flag usage. Repeatable for multiple replacements.
40-
Each \-e flag requires a pair of values for replacement.
41-
.P
42-
When using the \-e flag multiple times, the pattern-replacement pairs are executed in the same order they are specified, one by one.
43+
.TP
44+
.B \-r\fR, \fB\-\-replace\-names
45+
Replace matches in file and directory names.
4346

44-
.B "-h, --help"
45-
Display this help message and exit.
47+
.TP
48+
.B \-n\fR, \fB\-\-names\-only
49+
Only replace matching names, ignoring file contents.
4650

47-
.SH EXAMPLES
48-
.B jet "foo" "bar" my/path1 my/path2
49-
.br
50-
Replace all occurrences of "foo" with "bar" in the files under my/path1 and my/path2.
51-
.P
52-
.B jet -e "foo" "bar" -e "baz" "qux" my/path1 my/path2
53-
.br
54-
Replace all occurrences of "foo" with "bar" and "baz" with "qux" in the files under my/path1 and my/path2.
55-
.P
56-
.B jet -p -v "foo" "bar" my/path1
57-
.br
58-
Replace "foo" with "bar" in my/path1 and print the results to stdout with verbose output.
59-
.P
60-
.B jet -e "foo" "bar" -e "baz" "qux" -g "*.txt" -a my/path1
61-
.br
62-
Replace "foo" with "bar" and "baz" with "qux" in all text files, including hidden files, under my/path1.
51+
.TP
52+
.B \-e \fIpattern replacement\fR
53+
Specify a regular expression pattern and replacement.
54+
Can be used multiple times for multiple replacements.
55+
56+
.TP
57+
.B \-h\fR, \fB\-\-help
58+
Prints this help message and exits.
6359

6460
.SH NOTICE
6561
When using the \-e flag multiple times, the pattern-replacement pairs are executed in the same order they are specified, one by one.
6662

63+
.SH EXAMPLES
64+
.TP
65+
.B jet "foo" "bar" my/path1 my/path2
66+
Replace all occurrences of "foo" with "bar" in the files under \fImy/path1\fR and \fImy/path2\fR.
67+
68+
.TP
69+
.B jet \-e "foo" "bar" \-e "baz" "qux" my/path1 my/path2
70+
Replace all occurrences of "foo" with "bar" and "baz" with "qux" in the files under \fImy/path1\fR and \fImy/path2\fR.
71+
72+
.TP
73+
.B jet \-p \-v "foo" "bar" my/path1
74+
Replace "foo" with "bar" in \fImy/path1\fR and print the results to stdout with verbose output.
75+
76+
.TP
77+
.B jet \-n "foo" "bar" my/path1
78+
Rename files and directories by replacing "foo" with "bar" in their names under \fImy/path1\fR, without modifying file contents.
79+
80+
.TP
81+
.B jet \-e "foo" "bar" \-e "baz" "qux" \-g "*.txt" \-a my/path1
82+
Replace "foo" with "bar" and "baz" with "qux" in all text files, including hidden files, under \fImy/path1\fR.
83+
6784
.SH COPYRIGHT
6885
Jet Copyright (C) 2023 Nicolò Santamaria
6986
This program comes with ABSOLUTELY NO WARRANTY; for details refer to https://www.gnu.org/licenses/gpl-3.0.html.

0 commit comments

Comments
 (0)