-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add [once]
table option to xshe.toml
#21
Labels
Comments
With the changes in #30, the necessity for shell-specific |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
[once]
table should be a table that only runs if it hasn't setup any of its environment variables yet. It will do this by adding a environment variable__xshe_NAME
, whereNAME
is the name of each environment variable.For example, to set
PATH
without having it keep being modified every timexshe.toml
gets sourced, this can be done:This will set these two environment variables if there is not a environment variable named
$__xshe_PATH
set to1
:$PATH
to the expected value, and$__xshe_PATH
to1
.Additionally, specific tables[shell.SHELL.once]
(whereSHELL
is any of the supported shells) should be created that work likeshell.SHELL
but only run if the given shell is being used.The text was updated successfully, but these errors were encountered: