Add docs for shell completion

This commit is contained in:
Ivan Habunek 2023-12-07 19:21:41 +01:00
parent bbf67c6736
commit c7b5669c78
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
5 changed files with 51 additions and 2 deletions

View File

@ -3,6 +3,14 @@ Changelog
<!-- Do not edit. This file is automatically generated from changelog.yaml.-->
**0.40.0 (TBA)**
* Migrate to `click` for commandline arguments. BC should be mostly preserved,
please report any issues.
* Add shell completion, see: https://toot.bezdomni.net/shell_completion.html
* Remove deprecated `--disable-https` option for `login` and `login_cli`, pass
the base URL instead
**0.39.0 (2023-11-23)**
* Add `--json` option to many commands, this makes them print the JSON data

View File

@ -1,8 +1,9 @@
0.40.0:
date: TBA
changes:
- "Migrated to `click` for commandline arguments. BC should be mostly preserved, please report any issues."
- "Removed the deprecated `--disable-https` option for `login` and `login_cli`, pass the base URL instead"
- "Migrate to `click` for commandline arguments. BC should be mostly preserved, please report any issues."
- "Add shell completion, see: https://toot.bezdomni.net/shell_completion.html"
- "Remove deprecated `--disable-https` option for `login` and `login_cli`, pass the base URL instead"
0.39.0:
date: 2023-11-23

View File

@ -6,6 +6,7 @@
- [Usage](usage.md)
- [Advanced](advanced.md)
- [Settings](settings.md)
- [Shell completion](shell_completion.md)
- [TUI](tui.md)
- [Contributing](contributing.md)
- [Documentation](documentation.md)

View File

@ -3,6 +3,14 @@ Changelog
<!-- Do not edit. This file is automatically generated from changelog.yaml.-->
**0.40.0 (TBA)**
* Migrate to `click` for commandline arguments. BC should be mostly preserved,
please report any issues.
* Add shell completion, see: https://toot.bezdomni.net/shell_completion.html
* Remove deprecated `--disable-https` option for `login` and `login_cli`, pass
the base URL instead
**0.39.0 (2023-11-23)**
* Add `--json` option to many commands, this makes them print the JSON data

31
docs/shell_completion.md Normal file
View File

@ -0,0 +1,31 @@
# Shell completion
> Introduced in toot 0.40.0
Toot uses [Click shell completion](https://click.palletsprojects.com/en/8.1.x/shell-completion/) which works on Bash, Fish and Zsh.
To enable completion, toot must be [installed](./installation.html) as a command and available by ivoking `toot`. Then follow the instructions for your shell.
**Bash**
Add to `~/.bashrc`:
```
eval "$(_TOOT_COMPLETE=bash_source toot)"
```
**Fish**
Add to `~/.config/fish/completions/toot.fish`:
```
_TOOT_COMPLETE=fish_source toot | source
```
**Zsh**
Add to `~/.zshrc`:
```
eval "$(_TOOT_COMPLETE=zsh_source toot)"
```