diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index d2d19a0..5fe913b 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -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) diff --git a/docs/environment_variables.md b/docs/environment_variables.md new file mode 100644 index 0000000..4ba05f7 --- /dev/null +++ b/docs/environment_variables.md @@ -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__`. + +### 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).