mirror of
https://github.com/ihabunek/toot
synced 2025-01-24 16:31:49 +01:00
Add docs for environment variables
This commit is contained in:
parent
0848a6f7df
commit
875bf2d86a
@ -7,6 +7,7 @@
|
||||
- [Advanced](advanced.md)
|
||||
- [Settings](settings.md)
|
||||
- [Shell completion](shell_completion.md)
|
||||
- [Environment variables](environment_variables.md)
|
||||
- [TUI](tui.md)
|
||||
- [Contributing](contributing.md)
|
||||
- [Documentation](documentation.md)
|
||||
|
19
docs/environment_variables.md
Normal file
19
docs/environment_variables.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Environment variables
|
||||
|
||||
> Introduced in toot v0.40.0
|
||||
|
||||
Toot allows setting defaults for parameters via environment variables.
|
||||
|
||||
Environment variables should be named `TOOT_<COMMAND_NAME>_<OPTION_NAME>`.
|
||||
|
||||
### Examples
|
||||
|
||||
Command with option | Environment variable
|
||||
------------------- | --------------------
|
||||
`toot --color` | `TOOT_COLOR=true`
|
||||
`toot --no-color` | `TOOT_COLOR=false`
|
||||
`toot post --editor vim` | `TOOT_POST_EDITOR=vim`
|
||||
`toot post --visibility unlisted` | `TOOT_POST_VISIBILITY=unlisted`
|
||||
`toot tui --media-viewer feh` | `TOOT_TUI_MEDIA_VIEWER=feh`
|
||||
|
||||
Note that these can also be set via the [settings file](./settings.html).
|
Loading…
Reference in New Issue
Block a user