Skip to content

Commit 1b1a436

Browse files
Oliver Ruben Albertinibruno-
authored andcommitted
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.
1 parent d776f4e commit 1b1a436

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/copy_pane_pwd.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@ display_notice() {
1616

1717
main() {
1818
local copy_command
19+
local payload
1920
# shellcheck disable=SC2119
2021
copy_command="$(clipboard_copy_command)"
22+
payload="$(pane_current_path | tr -d '\n')"
2123
# $copy_command below should not be quoted
22-
pane_current_path | tr -d '\n' | $copy_command
24+
echo "$payload" | $copy_command
25+
tmux set-buffer "$payload"
2326
display_notice
2427
}
2528
main

0 commit comments

Comments
 (0)