From 062980cd272cee0b8f3a32704d076b654ecd1e1a Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sun, 11 May 2025 20:03:52 +0300 Subject: [PATCH] *grep*, btrfs*: add option placeholders (#16438) --- pages/common/bzegrep.md | 10 +++++----- pages/common/bzfgrep.md | 10 +++++----- pages/common/bzgrep.md | 14 +++++++------- pages/common/ptargrep.md | 4 ++-- pages/common/ugrep.md | 14 +++++++------- pages/common/vgrep.md | 12 ++++++------ pages/common/xzgrep.md | 14 +++++++------- pages/common/zegrep.md | 10 +++++----- pages/linux/btrfs-check.md | 4 ++-- pages/linux/btrfs-device.md | 6 +++--- pages/linux/btrfs-inspect-internal.md | 2 +- 11 files changed, 50 insertions(+), 50 deletions(-) diff --git a/pages/common/bzegrep.md b/pages/common/bzegrep.md index c09fe7f0f0..7f0c6b9870 100644 --- a/pages/common/bzegrep.md +++ b/pages/common/bzegrep.md @@ -9,20 +9,20 @@ - Search for extended regular expressions (supporting `?`, `+`, `{}`, `()` and `|`) in a compressed file (case-insensitive): -`bzegrep --ignore-case "{{search_pattern}}" {{path/to/file}}` +`bzegrep {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}` - Search for lines that do not match a pattern: -`bzegrep --invert-match "{{search_pattern}}" {{path/to/file}}` +`bzegrep {{[-v|--invert-match]}} "{{search_pattern}}" {{path/to/file}}` - Print file name and line number for each match: -`bzegrep --with-filename --line-number "{{search_pattern}}" {{path/to/file}}` +`bzegrep {{[-H|--with-filename]}} {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file}}` - Search for lines matching a pattern, printing only the matched text: -`bzegrep --only-matching "{{search_pattern}}" {{path/to/file}}` +`bzegrep {{[-o|--only-matching]}} "{{search_pattern}}" {{path/to/file}}` - Recursively search files in a bzip2 compressed tar archive for a pattern: -`bzegrep --recursive "{{search_pattern}}" {{path/to/file}}` +`bzegrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/file}}` diff --git a/pages/common/bzfgrep.md b/pages/common/bzfgrep.md index 9a79a764c6..a258a16a7f 100644 --- a/pages/common/bzfgrep.md +++ b/pages/common/bzfgrep.md @@ -9,20 +9,20 @@ - Search for lines matching the list of search strings separated by new lines in a compressed file (case-insensitive): -`bzfgrep --ignore-case "{{search_string}}" {{path/to/file}}` +`bzfgrep {{[-i|--ignore-case]}} "{{search_string}}" {{path/to/file}}` - Search for lines that do not match the list of search strings separated by new lines in a compressed file: -`bzfgrep --invert-match "{{search_string}}" {{path/to/file}}` +`bzfgrep {{[-v|--invert-match]}} "{{search_string}}" {{path/to/file}}` - Print file name and line number for each match: -`bzfgrep --with-filename --line-number "{{search_string}}" {{path/to/file}}` +`bzfgrep {{[-H|--with-filename]}} {{[-n|--line-number]}} "{{search_string}}" {{path/to/file}}` - Search for lines matching a pattern, printing only the matched text: -`bzfgrep --only-matching "{{search_string}}" {{path/to/file}}` +`bzfgrep {{[-o|--only-matching]}} "{{search_string}}" {{path/to/file}}` - Recursively search files in a bzip2 compressed tar archive for the given list of strings: -`bzfgrep --recursive "{{search_string}}" {{path/to/file}}` +`bzfgrep {{[-r|--recursive]}} "{{search_string}}" {{path/to/file}}` diff --git a/pages/common/bzgrep.md b/pages/common/bzgrep.md index e5581f868a..9295b26b43 100644 --- a/pages/common/bzgrep.md +++ b/pages/common/bzgrep.md @@ -9,24 +9,24 @@ - Use extended regular expressions (supports `?`, `+`, `{}`, `()` and `|`), in case-insensitive mode: -`bzgrep --extended-regexp --ignore-case "{{search_pattern}}" {{path/to/file}}` +`bzgrep {{[-E|--extended-regexp]}} {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}` -- Print 3 lines of context around, before, or after each match: +- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match: -`bzgrep --{{context|before-context|after-context}}={{3}} "{{search_pattern}}" {{path/to/file}}` +`bzgrep --{{context|before-context|after-context}} {{3}} "{{search_pattern}}" {{path/to/file}}` - Print file name and line number for each match: -`bzgrep --with-filename --line-number "{{search_pattern}}" {{path/to/file}}` +`bzgrep {{[-H|--with-filename]}} {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file}}` - Search for lines matching a pattern, printing only the matched text: -`bzgrep --only-matching "{{search_pattern}}" {{path/to/file}}` +`bzgrep {{[-o|--only-matching]}} "{{search_pattern}}" {{path/to/file}}` - Recursively search files in a bzip2 compressed tar archive for a pattern: -`bzgrep --recursive "{{search_pattern}}" {{path/to/tar/file}}` +`bzgrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/tar/file}}` - Search `stdin` for lines that do not match a pattern: -`cat {{/path/to/bz/compressed/file}} | bzgrep --invert-match "{{search_pattern}}"` +`cat {{/path/to/bz/compressed/file}} | bzgrep {{[-v|--invert-match]}} "{{search_pattern}}"` diff --git a/pages/common/ptargrep.md b/pages/common/ptargrep.md index 506a2773d4..5f8b991101 100644 --- a/pages/common/ptargrep.md +++ b/pages/common/ptargrep.md @@ -9,8 +9,8 @@ - Extract to the current directory using the basename of the file from the archive: -`ptargrep --basename "{{search_pattern}}" {{path/to/file}}` +`ptargrep {{[-b|--basename]}} "{{search_pattern}}" {{path/to/file}}` - Search for a case-insensitive pattern matching within a tar archive: -`ptargrep --ignore-case "{{search_pattern}}" {{path/to/file}}` +`ptargrep {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}` diff --git a/pages/common/ugrep.md b/pages/common/ugrep.md index a845abd94c..f7faabef22 100644 --- a/pages/common/ugrep.md +++ b/pages/common/ugrep.md @@ -5,7 +5,7 @@ - Start a query TUI to search files in the current directory recursively (`` for help): -`ugrep --query` +`ugrep {{[-Q|--query]}}` - Search the current directory recursively for files containing a regex search pattern: @@ -13,24 +13,24 @@ - Search in a specific file or in all files in a specific directory, showing line numbers of matches: -`ugrep --line-number "{{search_pattern}}" {{path/to/file_or_directory}}` +`ugrep {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file_or_directory}}` - Search in all files in the current directory recursively and print the name of each matching file: -`ugrep --files-with-matches "{{search_pattern}}"` +`ugrep {{[-l|--files-with-matches]}} "{{search_pattern}}"` - Fuzzy search files with up to 3 extra, missing or mismatching characters in the pattern: -`ugrep --fuzzy={{3}} "{{search_pattern}}"` +`ugrep {{[-Z|--fuzzy=]}}{{3}} "{{search_pattern}}"` - Also search compressed files, Zip and tar archives recursively: -`ugrep --decompress "{{search_pattern}}"` +`ugrep {{[-z|--decompress]}} "{{search_pattern}}"` - Search only files whose filenames match a specific glob pattern: -`ugrep --glob="{{glob_pattern}}" "{{search_pattern}}"` +`ugrep {{[-g |--glob=]}}"{{glob_pattern}}" "{{search_pattern}}"` - Search only C++ source files (use `--file-type=list` to list all file types): -`ugrep --file-type=cpp "{{search_pattern}}"` +`ugrep {{[-t |--file-type=]}}cpp "{{search_pattern}}"` diff --git a/pages/common/vgrep.md b/pages/common/vgrep.md index 75e345abe2..893763408e 100644 --- a/pages/common/vgrep.md +++ b/pages/common/vgrep.md @@ -2,7 +2,7 @@ > A user friendly pager for grep. > See also: `ugrep`, `rg`. -> More information: . +> More information: . - Recursively search the current directory for a pattern and cache it: @@ -14,20 +14,20 @@ - Open the "4th" match from the cache in the default editor: -`vgrep --show {{4}}` +`vgrep {{[-s|--show]}} {{4}}` - Display a context of "3" lines for each match in the cache: -`vgrep --show=context{{3}}` +`vgrep {{[-s|--show]}} {{[c|context]}}{{3}}` - Display the number of matches for each directory in the tree: -`vgrep --show=tree` +`vgrep {{[-s|--show]}} {{[t|tree]}}` - Display the number of matches for each file in the tree: -`vgrep --show=files` +`vgrep {{[-s|--show]}} {{[f|files]}}` - Start an interactive shell with cached matches: -`vgrep --interactive` +`vgrep {{[-i|--interactive]}}` diff --git a/pages/common/xzgrep.md b/pages/common/xzgrep.md index bb23407ea8..eba66aa124 100644 --- a/pages/common/xzgrep.md +++ b/pages/common/xzgrep.md @@ -10,24 +10,24 @@ - Search for an exact string (disables regular expressions): -`xzgrep --fixed-strings "{{exact_string}}" {{path/to/file}}` +`xzgrep {{[-F|--fixed-strings]}} "{{exact_string}}" {{path/to/file}}` - Search for a pattern in all files showing line numbers of matches: -`xzgrep --line-number "{{search_pattern}}" {{path/to/file}}` +`xzgrep {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file}}` - Use extended regular expressions (supports `?`, `+`, `{}`, `()` and `|`), in case-insensitive mode: -`xzgrep --extended-regexp --ignore-case "{{search_pattern}}" {{path/to/file}}` +`xzgrep {{[-E|--extended-regexp]}} {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}` -- Print 3 lines of context around, before, or after each match: +- Print 3 lines of [C]ontext around, [B]efore, or [A]fter each match: -`xzgrep --{{context|before-context|after-context}}={{3}} "{{search_pattern}}" {{path/to/file}}` +`xzgrep --{{context|before-context|after-context}} {{3}} "{{search_pattern}}" {{path/to/file}}` - Print file name and line number for each match with color output: -`xzgrep --with-filename --line-number --color=always "{{search_pattern}}" {{path/to/file}}` +`xzgrep {{[-H|--with-filename]}} {{[-n|--line-number]}} --color=always "{{search_pattern}}" {{path/to/file}}` - Search for lines matching a pattern, printing only the matched text: -`xzgrep --only-matching "{{search_pattern}}" {{path/to/file}}` +`xzgrep {{[-o|--only-matching]}} "{{search_pattern}}" {{path/to/file}}` diff --git a/pages/common/zegrep.md b/pages/common/zegrep.md index 820cb43260..7da62e5a18 100644 --- a/pages/common/zegrep.md +++ b/pages/common/zegrep.md @@ -9,20 +9,20 @@ - Search for extended regular expressions (supporting `?`, `+`, `{}`, `()` and `|`) in a compressed file (case-insensitive): -`zegrep --ignore-case "{{search_pattern}}" {{path/to/file}}` +`zegrep {{[-i|--ignore-case]}} "{{search_pattern}}" {{path/to/file}}` - Search for lines that do not match a pattern: -`zegrep --invert-match "{{search_pattern}}" {{path/to/file}}` +`zegrep {{[-v|--invert-match]}} "{{search_pattern}}" {{path/to/file}}` - Print file name and line number for each match: -`zegrep --with-filename --line-number "{{search_pattern}}" {{path/to/file}}` +`zegrep {{[-H|--with-filename]}} {{[-n|--line-number]}} "{{search_pattern}}" {{path/to/file}}` - Search for lines matching a pattern, printing only the matched text: -`zegrep --only-matching "{{search_pattern}}" {{path/to/file}}` +`zegrep {{[-o|--only-matching]}} "{{search_pattern}}" {{path/to/file}}` - Recursively search files in a compressed file for a pattern: -`zegrep --recursive "{{search_pattern}}" {{path/to/file}}` +`zegrep {{[-r|--recursive]}} "{{search_pattern}}" {{path/to/file}}` diff --git a/pages/linux/btrfs-check.md b/pages/linux/btrfs-check.md index e135ce4af2..7172843f15 100644 --- a/pages/linux/btrfs-check.md +++ b/pages/linux/btrfs-check.md @@ -13,7 +13,7 @@ - Show the progress of the check: -`sudo btrfs check --progress {{path/to/partition}}` +`sudo btrfs check {{[-p|--progress]}} {{path/to/partition}}` - Verify the checksum of each data block (if the filesystem is good): @@ -21,7 +21,7 @@ - Use the `n`-th superblock (`n` can be 0, 1 or 2): -`sudo btrfs check --super {{n}} {{path/to/partition}}` +`sudo btrfs check {{[-s|--super]}} {{n}} {{path/to/partition}}` - Rebuild the checksum tree: diff --git a/pages/linux/btrfs-device.md b/pages/linux/btrfs-device.md index a10b066ade..1117da4c1a 100644 --- a/pages/linux/btrfs-device.md +++ b/pages/linux/btrfs-device.md @@ -5,11 +5,11 @@ - Add one or more devices to a btrfs filesystem: -`sudo btrfs device add {{path/to/block_device1}} [{{path/to/block_device2}}] {{path/to/btrfs_filesystem}}` +`sudo btrfs device add {{path/to/block_device1 path/to/block_device2 ...}} {{path/to/btrfs_filesystem}}` - Remove a device from a btrfs filesystem: -`sudo btrfs device remove {{path/to/device|device_id}} [{{...}}]` +`sudo btrfs device remove {{path/to/device1|device_id1 path/to/device2|device_id2 ...}}` - Display error statistics: @@ -17,7 +17,7 @@ - Scan all disks and inform the kernel of all detected btrfs filesystems: -`sudo btrfs device scan --all-devices` +`sudo btrfs device scan {{[-d|--all-devices]}}` - Display detailed per-disk allocation statistics: diff --git a/pages/linux/btrfs-inspect-internal.md b/pages/linux/btrfs-inspect-internal.md index e63cab25f6..6a62ce6574 100644 --- a/pages/linux/btrfs-inspect-internal.md +++ b/pages/linux/btrfs-inspect-internal.md @@ -9,7 +9,7 @@ - Print superblock's and all of its copies' information: -`sudo btrfs inspect-internal dump-super --all {{path/to/partition}}` +`sudo btrfs inspect-internal dump-super {{[-a|--all]}} {{path/to/partition}}` - Print filesystem's metadata information: