-
-
Notifications
You must be signed in to change notification settings - Fork 843
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
Read evar using os.getenv() in wezterm.lua doesn't work #6612
Comments
The reason it doesn't work is because when the configuration is read, it can only read evars that were set before wezterm is started. An alternative to what you're trying to do, could be to just hide the tab bar when there is only one tab |
The |
I see, if you're using the wezterm's shell integration described here: More stuff to read on how to pass data from pane to your config: |
I read through the shell integration docs and added the below lines to my
|
It does not set an evar, but sets a user variable for the current wezterm pane. Those can be detected in your config by registering a handler to react to a user var being set. But you can also access the user variables of a pane with Make sure to read this section thoroughly: |
Awesome. Thanks. |
What Operating System(s) are you seeing this problem on?
macOS
Which Wayland compositor or X11 Window manager(s) are you using?
N/A
WezTerm version
20240203-110809-5046fc22
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
No, and I'll explain why below
Describe the bug
I have to following code in
~/.config/wezterm/wezterm.lua
and I have the following line my my
~/.zshrc
export WEZTERM_USE_TMUX=true
but when WezTerm starts it doesn't work. Is it possible to read environment variable in wezterm.lua?
Thanks
To Reproduce
No response
Configuration
Provided in example.
Expected Behavior
Should be able to read evar from os.getenv("VAR")
Logs
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: