1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-01-19 05:49:14 +02:00

doc: scrub mentions of asciidoc/asciidoctor

This optional dependency is now finally dropped. So ends a long journey
of trying to generate man pages in a lightweight and dependable way. The
only thing I could figure out how to make work reliably was to just
learn how to write roff myself. Yay.
This commit is contained in:
Andrew Gallant 2023-11-21 07:58:39 -05:00
parent 040d8f2171
commit 5dc424d302
7 changed files with 26 additions and 28 deletions

View File

@ -101,11 +101,6 @@ jobs:
run: |
ci/ubuntu-install-packages
- name: Install packages (macOS)
if: matrix.os == 'macos-latest'
run: |
ci/macos-install-packages
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:

View File

@ -115,12 +115,6 @@ jobs:
run: |
ci/ubuntu-install-packages
- name: Install packages (macOS)
if: matrix.os == 'macos-latest'
shell: bash
run: |
ci/macos-install-packages
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:

View File

@ -8,6 +8,15 @@ Unreleased changes. Release notes have not yet been written.
`rg -B1 -A2`. That is, `-A` and `-B` no longer completely override `-C`.
Instead, they only partially override `-C`.
Build process changes:
* ripgrep's shell completions and man page are now created by running ripgrep
with a new `--generate` flag. For example, `rg --generate man` will write a
man page in `roff` format on stdout. The release archives have not changed.
* The optional build dependency on `asciidoc` or `asciidoctor` has been
dropped. Previously, it was used to produce ripgrep's man page. ripgrep now
owns this process itself by writing `roff` directly.
Performance improvements:
* [PERF #1760](https://github.com/BurntSushi/ripgrep/issues/1760):

22
FAQ.md
View File

@ -61,18 +61,24 @@ patch release out with a fix. However, no promises are made.
Does ripgrep have a man page?
</h3>
Yes! Whenever ripgrep is compiled on a system with `asciidoctor` or `asciidoc`
present, then a man page is generated from ripgrep's argv parser. After
compiling ripgrep, you can find the man page like so from the root of the
repository:
Yes. If you installed ripgrep through a package manager on a Unix system, then
it would have ideally been installed for you in the proper location. In which
case, `man rg` should just work.
Otherwise, you can ask ripgrep to generate the man page:
```
$ find ./target -name rg.1 -print0 | xargs -0 ls -t | head -n1
./target/debug/build/ripgrep-79899d0edd4129ca/out/rg.1
$ mkdir -p man/man1
$ rg --generate man > man/man1/rg.1
$ MANPATH="$PWD/man" man rg
```
Running `man -l ./target/debug/build/ripgrep-79899d0edd4129ca/out/rg.1` will
show the man page in your normal pager.
Or, if your version of `man` supports the `-l/--local-file` flag, then this
will suffice:
```
$ rg --generate man | man -l -
```
Note that the man page's documentation for options is equivalent to the output
shown in `rg --help`. To see more condensed documentation (one line per flag),

View File

@ -2,9 +2,8 @@ These are Docker images used for cross compilation in CI builds (or locally)
via the [Cross](https://github.com/rust-embedded/cross) tool.
The Cross tool actually provides its own Docker images, and all Docker images
in this directory are derived from one of them. We provide our own in order
to customize the environment. For example, we need to install some things like
`asciidoctor` in order to generate man pages. We also install compression tools
in this directory are derived from one of them. We provide our own in order to
customize the environment. For example, we need to install compression tools
like `xz` so that tests for the `-z/--search-zip` flag are run.
If you make a change to a Docker image, then you can re-build it. `cd` into the

View File

@ -1,3 +0,0 @@
#!/bin/sh
brew install asciidoctor

View File

@ -11,6 +11,4 @@ if ! command -V sudo; then
fi
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
asciidoctor \
zsh xz-utils liblz4-tool musl-tools \
brotli zstd
zsh xz-utils liblz4-tool musl-tools brotli zstd