From 0a9588a86678ce4b8bce3630c6d8decbb4fb3218 Mon Sep 17 00:00:00 2001 From: Zane <196507316+ZaneErebos@users.noreply.github.com> Date: Sun, 18 May 2025 21:00:59 -0400 Subject: [PATCH] Clarify situation in which man page and shell completions will be accessible when building from source --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6ffda9de..a4a5e7a0 100644 --- a/README.md +++ b/README.md @@ -468,14 +468,25 @@ binaries are also available: look for archives with `musl` in the file name. If you want to build `bat` from source, you need Rust 1.74.0 or higher. You can then use `cargo` to build everything: +#### From local source +```bash +cargo install --path . --locked +``` +> [!NOTE] +> The `--path .` above specifies the directory of the source code and NOT where `bat` will be installed. +> For more information see the docs for [`cargo install`](https://doc.rust-lang.org/cargo/commands/cargo-install.html). + +#### From `crates.io` ```bash cargo install --locked bat ``` Note that additional files like the man page or shell completion -files can not be installed in this way. They will be generated by `cargo` and should be available in the cargo target folder (under `build`). +files can not be installed automatically in both these ways. +If installing from a local source, they will be generated by `cargo` +and should be available in the cargo target folder under `build`. -Shell completions are also available by running: +Furthermore, shell completions are also available by running: ```bash bat --completion # see --help for supported shells