Repository navigation
feat(sessions): optionally close the session when the shell exits - #16
Open
andreas-byfut wants to merge 1 commit into
Open
andreas-byfut wants to merge 1 commit into
andreas-byfut wants to merge 1 commit into
Conversation
Add a setting, "Close the tab when the shell exits", off by default and included in config export/import. Off keeps the current behaviour: a clean end leaves a DISCONNECTED tab with its output readable and Reconnect available. A clean exit is the shell ending without a connection error: exit or logout, or the server closing the session. With the setting on, that closes the session, which also disconnects the transport and any jump hosts and lets the foreground service stop once nothing else is open. The output is gone with the tab. Closing the last session now always returns to the menu instead of an empty terminal, including when another screen such as the SFTP browser is open above it. This replaces the in-terminal "No open sessions" empty state. Closing the selected tab of several selects the first remaining one, and a script run waiting on a session that closes while connecting now reports an error instead of waiting forever.
Owner
|
Hey, im fine with these changes as they stand, however this is currently failing on the CI lint test. Please can you revise? For ref https://github.com/LordOfPolls/Shellwave/actions/runs/43396472401/job/132136598253?pr=16 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It is off by default and included in config export and import.
readable, and Reconnect is offered.
a connection error:
exit,logout, or the server closing the session. Closing alsodisconnects the transport and any jump hosts, and lets the foreground service stop. The
output is gone afterwards.
the SFTP browser open on top. This replaces the in-terminal "No open sessions" empty state.
showing a blank pane.
reports an error instead of waiting forever.
Tests:
SessionManagerTest(clean drop with the setting on),ConfigImportTest.Known limit: with the setting on, a script with "Close the session once the command finishes"
closes its tab, and its output with it.
Merge note: if this is merged after
fix/terminal-mouse-and-clipboard, git reports one conflict inthe imports of
SessionsScreen.kt. Keep thewheelNotchesimport and drop theEmptyStateimport.