Replies: 2 comments 4 replies
-
Usually, Finder is what launches WezTerm.app on macOS. Your shell isn't involved in that process, so those environment variables likely aren't set on macOS. The easiest thing to do is hardcode you preferred editor in args={
os.getenv("SHELL"),
"-c",
"exec $VISUAL \"" .. wezterm.config_dir .. "/wezterm.lua\""
} |
Beta Was this translation helpful? Give feedback.
-
I had a similar but different issue on Linux when trying to start the mux server via systemd. In case someone else has a similar issue: If you are starting [Unit]
Description=Wezterm Multiplexing Server
[Service]
# start with system shell as parent in order to inherit environment variables
ExecStart=/bin/bash -c /usr/bin/wezterm-mux-server
Restart=on-failure
[Install]
WantedBy=default.target This only works for you if your distro has configured bash to source environment variables from some profile. Update: Turns out I was very wrong! The "fix" only happened to work because I kept restarting the service via [Unit]
Description=Wezterm Multiplexing Server
After=gnome-session.target
[Service]
ExecStart=/usr/bin/wezterm-mux-server
Restart=on-failure
[Install]
WantedBy=gnome-session.target |
Beta Was this translation helpful? Give feedback.
-
I'm building a key mapping to edit my config file in nvim.
The environment variables never are recognized and
vi
(the third fallback) is always taken. I'm usingzsh
on MacOS. The environment variables are set in.zshenv
. I can see inps
a/usr/local/bin/zsh -l
from when I startedwezterm
. I can also see inps
avi /Users/glenn/.config/wezterm/wezterm.lua
when I invoke the action below.Code:
The rest works fine, just the
os.getenv
s don't work.Beta Was this translation helpful? Give feedback.
All reactions