fixed copy to os clipboard on macOS when xclip or xsel is installed, fixes #459
This commit is contained in:
parent
5abe651ccb
commit
a752c41bca
1 changed files with 5 additions and 5 deletions
10
.tmux.conf
10
.tmux.conf
|
@ -142,12 +142,12 @@ run -b 'tmux bind -T copy-mode-vi H send -X start-of-line 2> /dev/null || true'
|
|||
run -b 'tmux bind -t vi-copy L end-of-line 2> /dev/null || true'
|
||||
run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true'
|
||||
|
||||
# copy to macOS clipboard
|
||||
if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"'
|
||||
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
|
||||
# copy to X11 clipboard
|
||||
if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"'
|
||||
if -b '! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xclip -i -selection clipboard >/dev/null 2>&1"'
|
||||
# copy to macOS clipboard
|
||||
if -b 'command -v pbcopy > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | pbcopy"'
|
||||
if -b 'command -v reattach-to-user-namespace > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | reattach-to-user-namespace pbcopy"'
|
||||
# copy to Windows clipboard
|
||||
if -b 'command -v clip.exe > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | clip.exe"'
|
||||
if -b '[ -c /dev/clipboard ]' 'bind y run -b "tmux save-buffer - > /dev/clipboard"'
|
||||
|
@ -776,10 +776,10 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# fi
|
||||
#
|
||||
# tmux_conf_copy_to_os_clipboard=${tmux_conf_copy_to_os_clipboard:-false}
|
||||
# command -v pbcopy > /dev/null 2>&1 && command='pbcopy'
|
||||
# command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy'
|
||||
# command -v xsel > /dev/null 2>&1 && command='xsel -i -b'
|
||||
# ! command -v xsel > /dev/null 2>&1 && command -v xclip > /dev/null 2>&1 && command='xclip -i -selection clipboard > \/dev\/null 2>\&1'
|
||||
# command -v pbcopy > /dev/null 2>&1 && command='pbcopy'
|
||||
# command -v reattach-to-user-namespace > /dev/null 2>&1 && command='reattach-to-user-namespace pbcopy'
|
||||
# command -v clip.exe > /dev/null 2>&1 && command='clip\.exe'
|
||||
# [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard'
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue