1
0
mirror of https://github.com/samoshkin/tmux-config.git synced 2026-01-05 09:18:01 +00:00

Copy on MouseDragEnd event but do not reset copy mode and selection. Add shortcut to copy whole line. Strip trailing new lines from copied text

This commit is contained in:
Alexey Samoshkin
2017-11-29 23:24:09 +02:00
parent af2efd9561
commit 64e01e6bb4
3 changed files with 17 additions and 11 deletions

View File

@@ -7,7 +7,9 @@ is_app_installed() {
}
# get data either form stdin or from file
buf=$(cat "$@")
# 'echo -n' to strip any trailing new lines, so when we paste in command prompt
# it won't be executed immediately
buf=$(cat "$@" | xargs echo -n)
copy_backend_remote_tunnel_port=$(tmux show-option -gvq "@copy_backend_remote_tunnel_port")
copy_use_osc52_fallback=$(tmux show-option -gvq "@copy_use_osc52_fallback")
@@ -28,7 +30,7 @@ fi
# if copy backend is resolved, copy and exit
if [ -n "$copy_backend" ]; then
printf "$buf" | eval "$copy_backend"
printf "$buf" | eval "$copy_backend"
exit;
fi