From 54a38e532a7d80da3bd62ca8d7d87fabb9d5b720 Mon Sep 17 00:00:00 2001 From: graelo Date: Fri, 4 Nov 2022 22:57:22 +0100 Subject: [PATCH] feat(command): rename generate-tmux-plugin-config to init --- README.md | 2 +- src/bin/tmux-backup.rs | 2 +- src/config.rs | 4 ++-- src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 07265e1..711b587 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ Type ```shell mkdir ~/.tmux/plugins/tmux-backup -tmux-backup generate-tmux-plugin-config > ~/.tmux/plugins/tmux-backup/tmux-backup.tmux +tmux-backup init > ~/.tmux/plugins/tmux-backup/tmux-backup.tmux ``` If you don't use [tpm](https://github.com/tmux-plugins/tpm), just add this to your diff --git a/src/bin/tmux-backup.rs b/src/bin/tmux-backup.rs index 5a5fe08..4487d9e 100755 --- a/src/bin/tmux-backup.rs +++ b/src/bin/tmux-backup.rs @@ -135,7 +135,7 @@ async fn run(config: Config) { generate(shell, &mut app, name, &mut std::io::stdout()); } - Command::GenerateTmuxPluginConfig => { + Command::Init => { let text = std::include_str!("../../tmux-backup.tmux"); println!("{text}"); } diff --git a/src/config.rs b/src/config.rs index a8ecbcf..5d32138 100644 --- a/src/config.rs +++ b/src/config.rs @@ -121,9 +121,9 @@ pub enum Command { /// Outputs the default tmux plugin config to stdout. /// /// Similar to shell completions, this is done once when installing tmux-backup. Type - /// `tmux-backup generate-tmux-plugin-config > ~/.tmux/plugins/tmux-backup.tmux`. and source it + /// `tmux-backup init > ~/.tmux/plugins/tmux-backup.tmux`. and source it /// from your `~/.tmux.conf`. See the README for details. - GenerateTmuxPluginConfig, + Init, } /// Catalog subcommands. diff --git a/src/lib.rs b/src/lib.rs index bd0376b..8705067 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -123,7 +123,7 @@ //! //! ```shell //! mkdir ~/.tmux/plugins/tmux-backup -//! tmux-backup generate-tmux-plugin-config > ~/.tmux/plugins/tmux-backup/tmux-backup.tmux +//! tmux-backup init > ~/.tmux/plugins/tmux-backup/tmux-backup.tmux //! ``` //! //! If you don't use [tpm](https://github.com/tmux-plugins/tpm), just add this to your