I'm running tmux on a Mac, and want to use pbcopy and pbpaste.

As a workable hack, I tried adding this to my .zshrc:

    alias tmuxcopy='tmux detach && tmux showb | pbcopy && tmux attach'

Ideally, I want one command to run in tmux (bound to a key), which
will detach the current session, paste the latest buffer into the
Mac's clipboard, and then attach to the tmux session.

Running this alias in my tmux session detaches correctly, but then the
other commands don't run, as (I assume) the session is stopped.

I can of course manually detach, then have an alias to showb | pbcopy
&& attach, but I'd like one command to do this.

Is this possible?

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to