From 5cdfce43397dee585e1f3b49f408fd85da3d806c Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Wed, 4 Dec 2024 12:47:51 -0500 Subject: [PATCH] Document shell autocompletion. --- doc/src/guide/install.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doc/src/guide/install.md b/doc/src/guide/install.md index a933b16..9fbc5d0 100644 --- a/doc/src/guide/install.md +++ b/doc/src/guide/install.md @@ -58,3 +58,22 @@ cargo install --path row --locked ``` Ensure that `$HOME/.cargo/bin` is on your `$PATH`. + +## Configuring shell autocompletion + +Execute the appropriate command in your shell's profile: +* Bash: + ```shell + source <(COMPLETE=bash your_program) + ``` +* Fish: + ```shell + source (COMPLETE=fish your_program | psub) + ``` +* Zsh: + ```shell + source <(COMPLETE=zsh your_program) + ``` +For additional shell configurations, see [clap-complete's documentation]. + +[clap-complete's documentation]: https://docs.rs/clap_complete/latest/clap_complete/env/index.html