Skip to content
Snippets Groups Projects

Add beginner walkthrough documentation

Merged Hugo Trentesaux requested to merge hugo-doc into master
All threads resolved!
1 file
+ 14
0
Compare changes
  • Side-by-side
  • Inline
@@ -3,7 +3,7 @@
One can generate autocompletion for its favorite shell using the following option:
```sh
cargo run --release -- completion --generator <GENERATOR>
cargo run -- completion --generator <GENERATOR>
```
Where `GENERATOR` can be any of `bash`, `elvish`, `fish`, `powershell` and `zsh`.
@@ -14,7 +14,7 @@ First, get the completion file in a known place:
```sh
mkdir -p ~/.local/share/duniter
cargo run --release -- completion --generator bash > ~/.local/share/duniter/completion.bash
cargo run -- completion --generator bash > ~/.local/share/duniter/completion.bash
```
You can now manually source the file when needed:
@@ -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 -- completion --generator zsh > ~/.zsh/completion/_duniter.zsh
# add the following lines to your ~/.zshrc
fpath+=(~/.zsh/completion)
compinit # might slow down terminal startup
```
Loading