|
6 | 6 | jet \- Just Edit Text
|
7 | 7 |
|
8 | 8 | .SH SYNOPSIS
|
9 |
| -.B jet [OPTIONS] "pattern" "replacement" input-files... |
| 9 | +.B jet [OPTIONS] pattern replacement input-files... |
10 | 10 | .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... |
12 | 12 |
|
13 | 13 | .SH DESCRIPTION
|
14 | 14 | Jet is a fast and intuitive command-line tool for find and replace operations.
|
15 | 15 | .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. |
17 | 17 | .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. |
19 | 19 | .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. |
21 | 21 |
|
22 | 22 | .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. |
25 | 26 |
|
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. |
28 | 30 |
|
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. |
31 | 34 |
|
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). |
34 | 38 |
|
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. |
37 | 42 |
|
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. |
43 | 46 |
|
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. |
46 | 50 |
|
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. |
63 | 59 |
|
64 | 60 | .SH NOTICE
|
65 | 61 | When using the \-e flag multiple times, the pattern-replacement pairs are executed in the same order they are specified, one by one.
|
66 | 62 |
|
| 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 | + |
67 | 84 | .SH COPYRIGHT
|
68 | 85 | Jet Copyright (C) 2023 Nicolò Santamaria
|
69 | 86 | This program comes with ABSOLUTELY NO WARRANTY; for details refer to https://www.gnu.org/licenses/gpl-3.0.html.
|
|
0 commit comments