Skip to content

Commit e173b47

Browse files
committed
docs(completions): edit help output
1 parent ba0bef1 commit e173b47

File tree

1 file changed

+33
-10
lines changed

1 file changed

+33
-10
lines changed

src/commands.rs

Lines changed: 33 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -130,26 +130,49 @@ pub enum CliSubCommand {
130130
Wallets,
131131
/// Generate tab-completion scripts for your shell.
132132
///
133-
/// Outputs a shell-specific completion script to stdout.
134-
/// To enable completions you need to redirect this output into the appropriate location for your shell.
133+
/// The completion script is output on stdout, allowing you to redirect
134+
/// it to a file of your choosing. Where you place the file will depend
135+
/// on your shell and operating system.
136+
///
137+
/// Here are common setups for supported shells:
135138
///
136139
/// Bash:
137-
/// bdk-cli completions bash > ~/.local/share/bash-completion/completions/bdk-cli
140+
///
141+
/// Completion files are commonly stored in
142+
/// `~/.local/share/bash-completion/completions` for user-specific commands.
143+
/// Run the commands:
144+
///
145+
/// $ mkdir -p ~/.local/share/bash-completion/completions
146+
/// $ bdk-cli completions bash > ~/.local/share/bash-completion/completions/bdk-cli
138147
///
139148
/// Zsh:
140-
/// bdk-cli completions zsh > ~/.zfunc/_bdk-cli
141-
/// # Make sure ~/.zfunc is in your fpath (add to .zshrc):
142-
/// # fpath=(~/.zfunc $fpath)
143-
/// # autoload -Uz compinit && compinit
149+
///
150+
/// Completion files are commonly stored in a directory listed in your `fpath`.
151+
/// Run the commands:
152+
///
153+
/// $ mkdir -p ~/.zfunc
154+
/// $ bdk-cli completions zsh > ~/.zfunc/_bdk-cli
155+
///
156+
/// Make sure `~/.zfunc` is in your fpath by adding to your `.zshrc`:
157+
///
158+
/// fpath=(~/.zfunc $fpath)
159+
/// autoload -Uz compinit && compinit
144160
///
145161
/// Fish:
146-
/// bdk-cli completions fish > ~/.config/fish/completions/bdk-cli.fish
162+
///
163+
/// Completion files are commonly stored in
164+
/// `~/.config/fish/completions`. Run the commands:
165+
///
166+
/// $ mkdir -p ~/.config/fish/completions
167+
/// $ bdk-cli completions fish > ~/.config/fish/completions/bdk-cli.fish
147168
///
148169
/// PowerShell:
149-
/// bdk-cli completions powershell >> $PROFILE
170+
///
171+
/// $ bdk-cli completions powershell >> $PROFILE
150172
///
151173
/// Elvish:
152-
/// bdk-cli completions elvish >> ~/.elvish/rc.elv
174+
///
175+
/// $ bdk-cli completions elvish >> ~/.elvish/rc.elv
153176
///
154177
/// After installing the completion script, restart your shell or source
155178
/// the configuration file for the changes to take effect.

0 commit comments

Comments
 (0)