Skip to content

Commit

Permalink
Enable tab completion of commands/workspace names
Browse files Browse the repository at this point in the history
The `click` framework provides tab completion for more or less free, however
it does need to be enabled. This PR adds the requirements to set up tab
completion to the README.md, as well as adds completion support for
Workspace names to the `boardwalk workspace use` command. Prior to this,
knowing the full workspace name would be required, thus requiring the user
to look in the Boardwalkfile, or run `boardwalk workspace list` beforehand.

Resolves internal ticket SVRENG-493.
  • Loading branch information
asullivan-blze committed Aug 19, 2024
1 parent 0f75412 commit 9b1030c
Show file tree
Hide file tree
Showing 4 changed files with 889 additions and 493 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,34 @@ release, minus 1 minor version. So, if the current stable version is `3.22.x`,
Boardwalk should work with `3.21.x`. Consider using
[`pyenv`](https://github.com/pyenv/pyenv) to maintain fresh python environment.

#### Shell Completion

To enable shell completion for `boardwalk` and `boardwalkd`, the following set
of commands will generate the completion script and add them to your shell (a
shell restart will be needed):

##### Bash
```bash
_BOARDWALK_COMPLETE=bash_source boardwalk > ~/.boardwalk-complete.bash
_BOARDWALKD_COMPLETE=bash_source boardwalkd > ~/.boardwalkd-complete.bash
echo '. ~/.boardwalk-complete.bash' >> ~/.bashrc
echo '. ~/.boardwalkd-complete.bash' >> ~/.bashrc
```

##### Zsh
```zsh
_BOARDWALK_COMPLETE=zsh_source boardwalk > ~/.boardwalk-complete.zsh
_BOARDWALKD_COMPLETE=zsh_source boardwalkd > ~/.boardwalkd-complete.zsh
echo '. ~/.boardwalk-complete.zsh' >> ~/.zshrc
echo '. ~/.boardwalkd-complete.zsh' >> ~/.zshrc
```

##### Fish
```sh
_BOARDWALK_COMPLETE=fish_source boardwalk > ~/.config/fish/completions/boardwalk.fish
_BOARDWALKD_COMPLETE=fish_source boardwalkd > ~/.config/fish/completions/boardwalkd.fish
```

#### Container Install

Boardwalk may be built as a container image by running `make container`.
Expand Down
Loading

0 comments on commit 9b1030c

Please sign in to comment.