Skip to content

Commit 1fa4874

Browse files
authored
Update command line completion docs (#793)
* update command line completion docs * add brew command line completion sub-section in installation docs
1 parent 0b457a9 commit 1fa4874

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/command-line-completion.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ By default this command will print on the standard output (the shell window) the
1212
Use `arduino-cli completion bash > arduino-cli.sh` to generate the completion file.
1313
At this point you can move that file in `/etc/bash_completion.d/` (root access is required) with `sudo mv arduino-cli.sh /etc/bash_completion.d/`.
1414

15-
A not recommended alternative is to source the completion file in `.bashrc`.
15+
A not recommended alternative is to source the completion file in `~/.bashrc`.
1616

17-
Remember to open a new shell to test the functionality
17+
Remember to open a new shell to test the functionality.
1818

1919
### Zsh
2020
Use `arduino-cli completion zsh > _arduino-cli` to generate the completion file.
@@ -23,23 +23,23 @@ At this point you can place the file in a directory listed in your `fpath` if yo
2323
Or if you want you can create a directory, add it to your `fpath` and copy the file in it:
2424

2525
1. `mkdir ~/completion_zsh`
26-
2. add `fpath=($HOME/completion_zsh $fpath)` at the beginning of your `.zshrc` file
26+
2. add `fpath=($HOME/completion_zsh $fpath)` at the beginning of your `~/.zshrc` file
2727
3. `mv _arduino-cli ~/completion_zsh/`
2828

29-
Remember to open a new shell to test the functionality
30-
31-
*N.B.*
32-
The Zsh completion is working with [Oh-My-Zsh](https://ohmyz.sh/) but not with [Prezto](https://github.com/sorin-ionescu/prezto) (the zsh completion system is working in a different way than classic zsh). But hopefully it will be fixed in the future
29+
Remember to open a new shell to test the functionality.
3330

3431
### Fish
3532
Use `arduino-cli completion fish > arduino-cli.fish` to generate the completion file.
3633
At this point you can place the file in `~/.config/fish/completions` as stated in the [official documentation](http://fishshell.com/docs/current/index.html#where-to-put-completions).
3734
Remember to create the directory if it's not already there `mkdir -p ~/.config/fish/completions/` and then place the completion file in there with `mv arduino-cli.fish ~/.config/fish/completions/`
3835

39-
Remember to open a new shell to test the functionality
36+
Remember to open a new shell to test the functionality.
4037

4138
#### Disabling command and flag descriptions
4239
By default fish completion has command and flag description enabled by default. If you want to disable this behaviour you can simply pass the `--no-descriptions` flag when calling `completion` command and the generated file will not have descriptions
4340

4441
*N.B.*
4542
This flag is not compatible with bash or zsh
43+
44+
### Brew
45+
If you install the `arduino-cli` using [homebrew](https://brew.sh/) package manager the completion should work out of the box if you have followed the [official documentation](https://docs.brew.sh/Shell-Completion).

docs/installation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ The Arduino CLI is available as a Homebrew formula since version
77
brew update
88
brew install arduino-cli
99
```
10+
#### Command line completion
11+
[Command line completion](command-line-completion.md#brew) files are already bundled in the homebrew installation.
1012

1113
### Use the install script
1214

0 commit comments

Comments
 (0)