From a56b5a8e8de7c1e46c1121ba0683f2650ffe977c Mon Sep 17 00:00:00 2001 From: Hugo Trentesaux <hugo@trentesaux.fr> Date: Wed, 21 Sep 2022 18:01:24 +0200 Subject: [PATCH] add zsh autocomplete --- docs/user/autocompletion.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/user/autocompletion.md b/docs/user/autocompletion.md index ec524d426..1d46c0123 100644 --- a/docs/user/autocompletion.md +++ b/docs/user/autocompletion.md @@ -30,3 +30,17 @@ Or you can automatically source it at `bash` startup by adding this to your `~/. ``` You can now enjoy semantic completion of the `./target/release/duniter` command using `<Tab>` key. + +## Zsh + +Zsh equivalent + +```sh +# make directory to store completion +mkdir -p ~/.zsh/completion +# write the completion script +cargo run --release -- completion --generator zsh > ~/.zsh/completion/_duniter.zsh +# add the following lines to your ~/.zshrc +fpath+=(~/.zsh/completion) +compinit # might slow down terminal startup +``` -- GitLab