📖 Add table for all env vars and options

Should hopefully serve as a better overview of what option corresponds
to which environment variable and how they work.

Fixes #33.
This commit is contained in:
Marty Oehme 2025-02-06 15:58:56 +01:00
parent d66a1071ab
commit c900f2ce14
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -264,6 +264,22 @@ This is just an example to show how the echo mode works.
What follows is a list of all environment variables bemoji understands, What follows is a list of all environment variables bemoji understands,
with their default settings with their default settings
| Description | Commandline option | env | default |
| --- | --- | --- | --- |
| enable/disable newline | -n, --noline | BEMOJI_ECHO_NEWLINE | true |
| enable private mode | -p,--private | BEMOJI_PRIVATE_MODE | false |
| limit history items | -P,--hist-limit | BEMOJI_LIMIT_RECENT | |
| download specific emoji lists | -D,--download | BEMOJI_DOWNLOAD_LIST | |
| read emoji from file | -f,--file | BEMOJI_CUSTOM_LIST | |
| emoji lists directory | | BEMOJI_DB_LOCATION | $XDG_DATA_HOME/bemoji |
| emoji history directory | | BEMOJI_HISTORY_LOCATION | $XDG_STATE_HOME |
| custom default command | | BEMOJI_DEFAULT_CMD | |
| custom type command | | BEMOJI_TYPE_CMD | |
| custom pick command | | BEMOJI_PICKER_CMD | |
| custom clip command | | BEMOJI_CLIP_CMD | |
The environment variables have the following effects:
```sh ```sh
BEMOJI_DB_LOCATION="$XDG_DATA_HOME/bemoji" # where the emoji lists reside BEMOJI_DB_LOCATION="$XDG_DATA_HOME/bemoji" # where the emoji lists reside
BEMOJI_HISTORY_LOCATION="$XDG_STATE_HOME" # where the state file resides BEMOJI_HISTORY_LOCATION="$XDG_STATE_HOME" # where the state file resides
@ -278,6 +294,18 @@ BEMOJI_LIMIT_RECENT="" # whether to display recent entries
BEMOJI_ECHO_NEWLINE=true # whether to end the output with a newline character BEMOJI_ECHO_NEWLINE=true # whether to end the output with a newline character
``` ```
They can either be set like `export BEMOJI_LIMIT_RECENT=5` before executing `bemoji` and will
remain in the shell environment.
Or they can be set for just a single run of `bemoji` like this:
```sh
BEMOJI_ECHO_NEWLINE=true BEMOJI_PRIVATE_MODE=true bemoji
```
This is especially useful for advanced configurations like custom commands which do not have an
equivalent option to be set. Be careful with setting environment variables as setting them wrong
or forgetting about them can have detrimental impacts on the functionality of this program!
## 🤗 Issues ## 🤗 Issues
Thanks for checking this program out! ❤ Thanks for checking this program out! ❤