Dont set the EDITOR env var in child processes

It isnt really needed, since the various kittens dont rely on it
anymore, instead calling get_editor() to get the path to the editor.
Has the nice side-effect of not needing to run the shell at startup
to read its environment. Now the shell is only run if the user calls
the edit config file kitten. Fixes #3426
This commit is contained in:
Kovid Goyal
2021-03-29 11:56:48 +05:30
parent 4edbe0ea4f
commit 1e6fe7785a
4 changed files with 62 additions and 50 deletions

View File

@@ -852,3 +852,10 @@ def create_opts(args: CLIOptions, debug_config: bool = False, accumulate_bad_lin
print('Running under:', green('Wayland' if is_wayland(opts) else 'X11'))
compare_opts(opts)
return opts
def create_default_opts() -> OptionsStub:
from .config import load_config
config = tuple(resolve_config(SYSTEM_CONF, defconf, ()))
opts = load_config(*config)
return opts