- Python (kitty/launch.py): Track editor PID via monitor_pid to capture
exit code when editor window closes. Send exit code as data in the DONE
message instead of sending no data.
- Go (tools/cmd/edit_in_kitty/main.go): Parse exit code from DONE message
data and use lp.Quit(exit_code) to exit with the editor's exit code.
- Go (tools/cmd/tool/confirm_and_run_shebang.go): Check exit code when
running edit-in-kitty as a subprocess; abort execution on editor failure.
Testing is_local_file is insufficient since it can be false for local
files that dont have r/w permissions. Instead check if the child is
remote when the EditCmd is created and only use disconnected abort
if child was remote at creation but is not remote currently.
Move code to incrementally update lsc config into the kitten module do
that it is more likely to stay in sync with any future changes to the
kitten cli.
This commit addresses a few issues with the implementation of
'--incremental':
- Unspecified settings are reset to their default value, which
defeats the purpose of the option.
- It is assumed that the names of options in 'LayerCLIOptions' map
one to one with the names of fields in 'LayerShellConfig' but this
isn't true. For example: The 'margin_top' cli option sets the
'requested_top_margin' layer shell config.
- When some options are set to a certain value, they force other
options to be some value. The current implementation doesn't
account for this.
- The documentation is contradictory.
This is not as nice because the environment wont have been setup by
the shell before running the process, but it's the best we can do
for an unknown shell.
Useful if user builds up session to save by running programs via
the shell.
Note that the serialization format for session files has changed
slightly, becoming more robust and allowing us to add more types
of saved data in the future, without overloading user_vars and thus
risking name conflicts.
You can now specify `os_window_name` in addition to `os_window_class` in
startup sessions. It works for the initial session as well as new sessions
started with `new_os_window`.
Updated documentation in overview.rst to add `os_window_name` in the
Startup Session examples.
Although not related to this feature. The documentation in launch.py
was updated to note that the `launch --type` `tab` and `os-window` options
aren't supported when launch is invoked from a startup script. There's
already a note to that effect in the "Startup Sessions" section in
overview.rst but if you're looking at the launch syntax page like I was,
you wouldn't realize the limitation. This was throwing me for a loop while
wotking on this PR.
Resolves: #8387