env overrides don't seem to work w/ fish
basbebe opened this issue · comments
I'm using fish shell and kitty terminal.
When I open a new terminal with :connect-terminal
, the environment in the new shell isn't completely sset it seems.
$EDITOR and $VISUAL are still the same for me…
Maybe because you set these values in Fish.
Fish reads its config files and your user config every time it launches the shell, even when running a script, which might have side effects.
Yes, this is probably the Problem.
Do zou know of a way around this?
I thought bash / zsh would also read their variables on launch by default?
You can set the connect_environment
option to set your SHELL
to your favorite shell with additional parameters, or directly from the command-line with :connect-terminal fish --option value
.
for the record:
adding this to my config.fish
did work for me:
# connect.kak
if test -n "$IN_KAKOUNE_CONNECT"
set -x EDITOR :edit
set -x VISUAL :edit
end
* because after all I wasn't able to get this to work (and I don't know why):
set-option global connect_environment %{
export SHELL="/usr/local/bin/fish --init-command=\"set -x EDITOR :edit; set -x VISUAL :edit\""
}
The favorite way I think is to source an additional file.
might try this as well.
I was just really irritated that I wasn't able to get it to work by passing the arguments to the env variable.