copy_pane_pwd: set tmux buffer

All the other copy commands not only set the system clipboard, but also
set the tmux buffer to have the selection. For consistency, the copy
pane PWD action should behave the same way.
This commit is contained in:
Oliver Ruben Albertini 2020-09-13 10:10:18 -07:00 committed by Bruno Sutic
parent d776f4e94d
commit 1b1a436e19
No known key found for this signature in database
GPG key ID: CAFA7B1B2914ED81

View file

@ -16,10 +16,13 @@
main() {
local copy_command
local payload
# shellcheck disable=SC2119
copy_command="$(clipboard_copy_command)"
payload="$(pane_current_path | tr -d '\n')"
# $copy_command below should not be quoted
pane_current_path | tr -d '\n' | $copy_command
echo "$payload" | $copy_command
tmux set-buffer "$payload"
display_notice
}
main