diff options
author | Jae-Heon Ji <32578710+jaeheonji@users.noreply.github.com> | 2021-10-11 23:57:56 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-11 16:57:56 +0200 |
commit | 0ca5c187295a157d9e6d24676146681da4fa0188 (patch) | |
tree | 0b4cba0de0444319c66c4342828863613f52d588 /zellij-utils/src/cli.rs | |
parent | 8415004834d47e68da2fe4c5ecd9ef7f74945642 (diff) |
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 <aram@poor.dev>
Diffstat (limited to 'zellij-utils/src/cli.rs')
-rw-r--r-- | zellij-utils/src/cli.rs | 15 |
1 files changed, 15 insertions, 0 deletions
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<SessionCommand>, }, + + /// Kill the specific session + #[structopt(alias = "k")] + KillSession { + /// Name of target session + target_session: Option<String>, + }, + + /// Kill all sessions + #[structopt(alias = "ka")] + KillAllSessions { + /// Automatic yes to prompts + #[structopt(short, long)] + yes: bool, + }, } |