Skip to content

Commit

Permalink
copy_pane_pwd: set tmux buffer
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Oliver Ruben Albertini authored and bruno- committed Oct 2, 2020
1 parent d776f4e commit 1b1a436
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/copy_pane_pwd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ display_notice() {

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

0 comments on commit 1b1a436

Please sign in to comment.