On Wed, Apr 24, 2013 at 11:00 AM, James Jong <ribonucle...@gmail.com> wrote:
> The following worked in Tmux 1.7 for pasting text in tmux, but not in Tmux
> 1.8
>
> # Move x clipboard into tmux paste buffer
> bind-key -n C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
>
> But I now get the following in the status pane:
> xclip -o | tmux load-buffer - ; tmux paste-buffer exited with 127
>
> even though I can run xclip -o from the terminal (which correctly pastes my
> text)
>
> Any thoughts why?

Does it help if you redirect stdin from /dev/null? I.e.

    bind-key -n C-y run "exec </dev/null ; xclip -o | tmux load-buffer
- ; tmux paste-buffer"

It seems unlikely that "xclip -o" should be reading from stdin, but
run-shell (and if-shell) processes do get a different kind of stdin in
1.8. Also, a bug I introduced in 1.8 leaves run-shell (and if-shell)
proceses with an open, but non-responsive stdin (previously it was
always /dev/null).

If that works and you are comfortable building tmux form source, then
you might also try using your original command (no /dev/null redirect)
with a build from the SourceForge master branch; it has a fix that
should prevent the non-responsive stdin problem for run-shell (and
if-shell) processes.

If none of that helps, you might try temporarily capturing stderr (it
is usually /dev/null) to see if there are any useful error messages to
go with the 127 exit:

    bind-key -n C-y run "exec 2>&1 ; xclip -o | tmux load-buffer - ;
tmux paste-buffer"

--
Chris

------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to