Put the line corresponding to your shell in whatever file runs when loading environment variables.
For bash, this is ~/.bash_profile, for zsh, this is ~/.zshenv,
and for fish, this is ~/.config/fish/config.fish.
# Goes in ~/.bash_profile, ~/.profile, etc.
eval "$(xshe bash)"# Goes in ~/.zshenv (recommended), ~/.zprofile, etc.
eval "$(xshe zsh)"# Goes in ~/.config/fish/config.fish
xshe fish | sourceIf xshe isn't on your PATH (this is the cause of the error command not found: xshe),
you will have to manually type out the location:
eval "$(/path/to/xshe bash)"To specify a custom file that is not located at ~/.config/xshe.toml, pass the --file option, like so:
eval "$(xshe bash --file ~/some/other/location.toml)"To directly specify TOML to parse as a config file, use --text.
For example, this line directly parses the provided line and converts it to bash:
xshe bash --text "BIN_HOME = '~/.local/bin'"To pass a TOML configuration from the standard input, use --pipe.
As an example, this command concatenates two files named
global_xshe.toml and user_xshe.toml by using cat,
and then pipes the output into xshe to be parsed:
cat global_xshe.toml user_xshe.toml | xshe bash --pipeYou can control how much info is displayed when xshe is run.
The default behavior is to only display errors and warnings.
While this behavior is recommended, you can customize it by using the following flags:
-qqsilences all output (this silences errors and is not advised)-qor--quietshows only errors and hides warnings-vor--verboseshows info messages-vvshows debug logs-vvvshows trace logs
Run xshe --help to display command usage.
Run xshe --version to display version information.