Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not needed for Tmux 2.6+ #66

Open
aleksandrs-ledovskis opened this issue Oct 8, 2017 · 13 comments
Open

Not needed for Tmux 2.6+ #66

aleksandrs-ledovskis opened this issue Oct 8, 2017 · 13 comments

Comments

@aleksandrs-ledovskis
Copy link

Since tmux/tmux@78352fd and release 2.6 reattach-to-user-namespace trick doesn't seem to be needed.

$ echo "test" | pbcopy
$ pbpaste
test
@aleksandrs-ledovskis aleksandrs-ledovskis changed the title Note needed for Tmux 2.6 Not needed for Tmux 2.6 Oct 8, 2017
@raejin
Copy link

raejin commented Oct 9, 2017

You're right. I removed all the relevant copy vi mode bindings and killed the tmux server (to remove config caching). I can achieve the same result by only supplying the following binding:

bind-key -T copy-mode-vi v send -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"

I'm on macOS 10.13 with tmux 2.6

@lyuehh
Copy link

lyuehh commented Oct 26, 2017

Still needed for some cli tools, like trash, or brew home xx

@aleksandrs-ledovskis
Copy link
Author

@lyuehh

I did install trash from homebrew and executed

$ cd /tmp/
$ touch 123
$ trash 123

Afterwards, I verified that file "123" indeed was moved to macOS Trash.

Also, I tried brew home with rust and python arguments. Both commands succeeded in opening respective homepages in default browser.

So, appears working for me 🤷‍♂️

@lyuehh
Copy link

lyuehh commented Oct 26, 2017

@aleksandrs-ledovskis
On my computer , tmux was needed for trash, I don't known why ...

@christopher-francisco
Copy link

Can we add to the README some text that says in what tmux/macOS version this is not needed? :)

rglassett added a commit to rglassett/dotfiles that referenced this issue Feb 15, 2018
ustasb added a commit to ustasb/dotfiles that referenced this issue Feb 19, 2018
rglassett added a commit to rglassett/dotfiles that referenced this issue Mar 5, 2018
@luisgerhorst
Copy link

I'm not entirely sure if this is even related, but if you're using a recent iTerm there is a option "Applications in terminal may access clipboard" in the Preferences. When it is selected Tmux copies directly to the macOS system clipboard when using copy mode without any configuration. This even works over SSH.

I can access pbcopy et al. (also trash) from within Tmux (version 2.7) on macOS 10.13.4.

@fdelacruz
Copy link

@raejin are those even needed anymore??
I'm running tmux 2.7 and I can copy/paste to and from, no problem like any other app in mac (mojave)

@aleksandrs-ledovskis aleksandrs-ledovskis changed the title Not needed for Tmux 2.6 Not needed for Tmux 2.6+ Jul 23, 2018
@aleksandrs-ledovskis
Copy link
Author

@fdelacruz What method are you using? Aren't you mistaking text selection in terminal using mouse and pressing Cmd+C/Cmd+V vs. programmable copy & paste (as in pbcopy/pbpaste)

@fdelacruz
Copy link

fdelacruz commented Jul 23, 2018

@aleksandrs-ledovskis Hi, well, I'm not using the mouse. I'm simply selecting the text in vim's visual mode, yanking and pasting outside of tmux. I can do the reverse from any app too. What gives??

@fdelacruz
Copy link

I'm here wondering what am I doing wrong..

@aleksandrs-ledovskis
Copy link
Author

@fdelacruz Thing is, @raejin's comment/snippet refers to Tmux copy-mode configuration & is not applicable/affecting applications launched within terminal multiplexer, such as Vim.

Regarding Vim and yank ending up in OS clipboard - could it be that you are yanking to plus/+ register (or have unnamedplus in .vimrc)?

@fdelacruz
Copy link

fdelacruz commented Jul 23, 2018

@aleksandrs-ledovskis yes, I have mine configured as set clipboard=unnamed.
Btw, i just copied from the top command in tmux into vim outside.

dstrunk added a commit to dstrunk/dotfiles that referenced this issue Oct 24, 2018
Per this issue:
<ChrisJohnsen/tmux-MacOSX-pasteboard#66 (comment)>,
it appears 'reattach-to-user-namespace' is no longer needed (tested and
working locally for me as well).

This also takes care of an 'unsupported OS' message that happened with
reattach-to-user-namespace when firing up tmux in every pane.
joshukraine added a commit to joshukraine/dotfiles that referenced this issue Jan 15, 2019
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jun 3, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
briv pushed a commit to briv/dotfiles that referenced this issue Oct 25, 2020
alvis added a commit to alvis/.dotfiles that referenced this issue Nov 6, 2020
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
pmeinhardt added a commit to pmeinhardt/dotfiles that referenced this issue Dec 13, 2020
Looks like it is no longer needed to access the clipboard from tmux:
ChrisJohnsen/tmux-MacOSX-pasteboard#66
andreaswachowski added a commit to andreaswachowski/dotfiles that referenced this issue Jan 25, 2021
alvis added a commit to alvis/.dotfiles that referenced this issue Mar 18, 2021
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jul 15, 2021
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jul 15, 2021
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
alvis added a commit to alvis/.dotfiles that referenced this issue Jul 16, 2021
reattach-to-user-namespace is no longer needed since MacOS 10.13
see ChrisJohnsen/tmux-MacOSX-pasteboard#66
rspeicher added a commit to rspeicher/dotfiles-local that referenced this issue Oct 6, 2021
stackptr added a commit to stackptr/dotfiles that referenced this issue Oct 27, 2021
ksrb added a commit to ksrb/.files that referenced this issue Nov 16, 2021
ksrb added a commit to ksrb/.files that referenced this issue Dec 21, 2021
jaisonerick added a commit to jaisonerick/laptop that referenced this issue Nov 22, 2022
Since TMUX 2.6 reattach-to-namespace is no longer necessary. The
necessary changes were already made to dotfiles .tmux.conf

See: ChrisJohnsen/tmux-MacOSX-pasteboard#66
Chilledheart added a commit to Chilledheart/dotfiles that referenced this issue Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants