From 1d0b0b68e7288317e2c39abe3ec28997d74d3c6d Mon Sep 17 00:00:00 2001 From: Ferran Basora Date: Tue, 4 Aug 2020 17:09:08 +0000 Subject: [PATCH] Improve default command with display-message --- README.md | 4 ++-- src/swapper.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 48c83b5..6bd2aba 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ set -g @thumbs-regexp-2 '[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9 ### @thumbs-command -`default: 'tmux set-buffer {}'` +`default: 'tmux set-buffer {} && tmux display-message \"Copied {}\"'` Choose which command execute when you press a hint. `tmux-thumbs` will replace `{}` with the picked hint. @@ -180,7 +180,7 @@ set -g @thumbs-command 'echo -n {} | pbcopy' ### @thumbs-upcase-command -`default: 'tmux set-buffer {} && tmux paste-buffer'` +`default: 'tmux set-buffer {} && tmux paste-buffer && tmux display-message \"Copied {}\"` Choose which command execute when you press a upcase hint. `tmux-thumbs` will replace `{}` with the picked hint. diff --git a/src/swapper.rs b/src/swapper.rs index f9112b3..a7ef585 100644 --- a/src/swapper.rs +++ b/src/swapper.rs @@ -465,13 +465,13 @@ fn app_args<'a>() -> clap::ArgMatches<'a> { Arg::with_name("command") .help("Pick command") .long("command") - .default_value("tmux set-buffer {}"), + .default_value("tmux set-buffer {} && tmux display-message \"Copied {}\""), ) .arg( Arg::with_name("upcase_command") .help("Upcase command") .long("upcase-command") - .default_value("tmux set-buffer {} && tmux paste-buffer"), + .default_value("tmux set-buffer {} && tmux paste-buffer && tmux display-message \"Copied {}\""), ) .arg( Arg::with_name("osc52")