diff options
| author | Matthias Beyer <mail@beyermatthias.de> | 2022-07-12 12:17:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-12 12:17:24 +0200 |
| commit | 6e102c60842b4bda3fb11934968fddfa8de9eae5 (patch) | |
| tree | 56f3b87a750cbdb1e0175d36bbf2c769c802c230 /zellij-utils/src/ipc.rs | |
| parent | docs(changelog): refactor get session name (#1582) (diff) | |
| download | sl0ppij-6e102c60842b4bda3fb11934968fddfa8de9eae5.tar.gz sl0ppij-6e102c60842b4bda3fb11934968fddfa8de9eae5.tar.xz sl0ppij-6e102c60842b4bda3fb11934968fddfa8de9eae5.zip | |
fix(cli): let the exit message be different when detaching (#1573)
* Let the exit message be different when detaching
This patch changes the exit message printed to the user, so the user
does not get the impression that they fat-fingered an "exit" instead of
what was intended (a detach).
For this, the InputHandler::exit() function was refactored, to get the
reason as a parameter. As this function is not pub, this is considered
okay.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
* Change detach message
This patch changes the detach message to be more in line with the other
messages zellij displays to the user.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'zellij-utils/src/ipc.rs')
| -rw-r--r-- | zellij-utils/src/ipc.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/zellij-utils/src/ipc.rs b/zellij-utils/src/ipc.rs index db9dd039..a5268979 100644 --- a/zellij-utils/src/ipc.rs +++ b/zellij-utils/src/ipc.rs @@ -113,6 +113,7 @@ pub enum ServerToClientMsg { #[derive(Serialize, Deserialize, Debug, Clone)] pub enum ExitReason { Normal, + NormalDetached, ForceDetached, CannotAttach, Error(String), @@ -122,6 +123,7 @@ impl Display for ExitReason { fn fmt(&self, f: &mut Formatter) -> Result<(), Error> { match self { Self::Normal => write!(f, "Bye from Zellij!"), + Self::NormalDetached => write!(f, "Session detached"), Self::ForceDetached => write!( f, "Session was detached from this client (possibly because another client connected)" |
