1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-06-16 06:15:25 +00:00
toot/docs/environment_variables.md

20 lines
630 B
Markdown
Raw Permalink Normal View History

2023-12-07 19:05:58 +00:00
# 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).