1
0
Fork 0
mirror of synced 2024-12-27 16:53:22 -05:00
This commit is contained in:
Gregory Pakosz 2019-11-30 20:33:10 +01:00
parent 6c41c0a6e4
commit 38e29b6f73

View file

@ -628,9 +628,10 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# #
# _copy() { # _copy() {
# tty="$SSH_TTY" # tty="$SSH_TTY"
# tty=${tty:-$1} # osc52=$1
# tty=${tty:-$2}
# tty=${tty:-$(tmux display -p '#{pane_tty}')} # tty=${tty:-$(tmux display -p '#{pane_tty}')}
# buffer=${2:-$(tmux save-buffer - || true)} # buffer=${3:-$(tmux save-buffer - || true)}
# #
# [ -z "$buffer" ] && return # [ -z "$buffer" ] && return
# #
@ -650,7 +651,9 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# #
# # OSC 52 # # OSC 52
# # see https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/FAQ.md#Is-OSC-52-aka-clipboard-operations_supported # # see https://chromium.googlesource.com/apps/libapps/+/master/nassh/doc/FAQ.md#Is-OSC-52-aka-clipboard-operations_supported
# printf '\033Ptmux;\033\033]52;c;%s\a\033\\' "$(printf %s "$buffer" | head -c 74994 | base64 | tr -d '\r\n')" > "$tty" # if _is_enabled "$osc52"; then
# printf '\033Ptmux;\033\033]52;c;%s\a\033\\' "$(printf %s "$buffer" | head -c 74994 | base64 | tr -d '\r\n')" > "$tty"
# fi
# } # }
# #
# _apply_overrides() { # _apply_overrides() {
@ -729,30 +732,10 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim
# fi # fi
# #
# tmux_conf_copy_to_os_clipboard=${tmux_conf_copy_to_os_clipboard:-false} # 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 clip.exe > /dev/null 2>&1 && command='clip\.exe'
# [ -c /dev/clipboard ] && command='cat > \/dev\/clipboard'
#
# if [ -n "$command" ]; then
# if _is_enabled "$tmux_conf_copy_to_os_clipboard"; then
# perl -p -i -e "s/\bcopy-selection(-and-cancel)?\b/copy-pipe\1 '$command'/g" "$cfg"
# else
# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2/copy-selection\1/g" "$cfg"
# fi
# fi
#
# tmux_conf_share_remote_clipboard=${tmux_conf_share_remote_clipboard:-false} # tmux_conf_share_remote_clipboard=${tmux_conf_share_remote_clipboard:-false}
# if _is_enabled "$tmux_conf_share_remote_clipboard"; then # perl -p -i -e "s/\\\;\s+run-shell\s+(\"|')cut\s+-c3-\s+~\/\.tmux.conf\s+\|\s+sh\s+-s\s+_copy\s+.*?\s+#\{pane_tty\}\1$//g" "$cfg"
# if [ -n "$command" ]; then # if _is_enabled "$tmux_conf_copy_to_os_clipboard"; then
# if _is_enabled "$tmux_conf_copy_to_os_clipboard"; then # perl -p -i -e "s/\bcopy-(pipe|selection)(-and-cancel)?\b.+$/$& \\\\; run-shell 'cut -c3- ~\/\.tmux.conf | sh -s _copy $tmux_conf_share_remote_clipboard #{pane_tty}'/g" "$cfg"
# perl -p -i -e "s/\bcopy-selection(-and-cancel)?\b '$command'/$& cut -c3- ~\/\.tmux.conf | sh -s _copy #{pane_tty}/g" "$cfg"
# else
# perl -p -i -e "s/cut -c3- ~\/\.tmux.conf | sh -s _copy #\{pane_tty\}$//g" "$cfg"
# fi
# fi
# fi # fi
# #
# # until tmux >= 3.0, output of tmux list-keys can't be consumed back by tmux source-file without applying some escapings # # until tmux >= 3.0, output of tmux list-keys can't be consumed back by tmux source-file without applying some escapings