From 0ca5c187295a157d9e6d24676146681da4fa0188 Mon Sep 17 00:00:00 2001 From: Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> Date: Mon, 11 Oct 2021 23:57:56 +0900 Subject: feat(cli): add `kill-session` command (#745) * feat: add kill-session command * style: apply formatting rules * feat: add new instruction for kill-session * feat: update feedback of kill-session * separation of command `kill-session` and `kill-all-sessions` function. * Add information to various situations * Add a question (yes or no) when executing the `kill-all-sessions` command. * chore: adjust clippy warning * fix warning wording * make rustfmt happy Co-authored-by: Aram Drevekenin --- zellij-utils/src/cli.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'zellij-utils/src/cli.rs') diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs index 452033b8a..7ac9e958c 100644 --- a/zellij-utils/src/cli.rs +++ b/zellij-utils/src/cli.rs @@ -89,4 +89,19 @@ pub enum Sessions { #[structopt(subcommand, name = "options")] options: Option, }, + + /// Kill the specific session + #[structopt(alias = "k")] + KillSession { + /// Name of target session + target_session: Option, + }, + + /// Kill all sessions + #[structopt(alias = "ka")] + KillAllSessions { + /// Automatic yes to prompts + #[structopt(short, long)] + yes: bool, + }, } -- cgit v1.2.3