Hi

show-buffer is not meant to preserve line wraps. You want to use "tmux
save-buffer - >/path/to/file" instead.


On Sun, Mar 18, 2012 at 07:51:13AM +0800, Le Wang wrote:
>    I have some more details on how this is happening, but still not sure how
>    to fix it.
> 
>    I'm using this hack to copy lines into OS X clipboard:
>    [1]https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
> 
>    So I have this in my ~/.tmux.conf
> 
>    set-option -g default-command "reattach-to-user-namespace -l zsh" # or
>    bash
> 
>    bind C-c run "tmux show-buffer | cat - | reattach-to-user-namespace
>    pbcopy"
>    bind C-v run "reattach-to-user-namespace pbpaste | tmux load-buffer - &&
>    tmux paste-buffer"
>    I confirm from zsh that* see that when I do:
> 
>    tmux show-buffer > ~/tmp/foo.txt
>    Hard line wraps are inserted with my current pane width.
> 
>    However I use:
> 
>    tmux save-buffer ~/tmp/foo.txt
>    And the lines are fine.* How can I make the former usage work as expected?
> 
>    On Sun, Mar 18, 2012 at 1:53 AM, Nicholas Marriott
>    <[2]nicholas.marri...@gmail.com> wrote:
> 
>      How are you copying lines?
> 
>      On Sun, Mar 18, 2012 at 01:29:59AM +0800, Le Wang wrote:
>      > * *Hi all,
>      >
>      > * *I've no prior experience with terminal multi-plexers, so my point
>      of
>      > * *reference is iTerm2 on the Mac.* I'm trying out tmux, and coming
>      from a
>      > * *Emacs background, it feels really nice.
>      >
>      > * *However, I noticed that when copying lines longer than the terminal
>      width,
>      > * *the line breaks are HARD.* Is there any way to change this?
>      >
>      > * *I found this question:
>      > *
>      
> *[1][3]http://superuser.com/questions/346408/tmux-refresh-display-after-terminal-width-change
>      > * *, which appears to be the same issue I'm experiencing, so this is a
>      won't
>      > * *fix?* It seems really bad behaviour to me.
>      >
>      > * *How do other people handle this situation?* For example, I need to
>      copy a
>      > * *section of log file output to be analyzed in Emacs, but the
>      original lines
>      > * *are not preserved and I just get a bunch of terminal width sized
>      lines.
>      >
>      > * *iTerm2 handles this without problems, it sounds like screen might
>      as well?
>      >
>      > * *Thanks for any advice.
>      >
>      > * *--
>      > * *Le
>      >
>      > References
>      >
>      > * *Visible links
>      > * *1.
>      
> [4]http://superuser.com/questions/346408/tmux-refresh-display-after-terminal-width-change
> 
>      >
>      
> ------------------------------------------------------------------------------
>      > This SF email is sponsosred by:
>      > Try Windows Azure free for 90 days Click Here
>      > [5]http://p.sf.net/sfu/sfd2d-msazure
> 
>      > _______________________________________________
>      > tmux-users mailing list
>      > [6]tmux-users@lists.sourceforge.net
>      > [7]https://lists.sourceforge.net/lists/listinfo/tmux-users
> 
>    --
>    Le
> 
> References
> 
>    Visible links
>    1. https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard
>    2. mailto:nicholas.marri...@gmail.com
>    3. 
> http://superuser.com/questions/346408/tmux-refresh-display-after-terminal-width-change
>    4. 
> http://superuser.com/questions/346408/tmux-refresh-display-after-terminal-width-change
>    5. http://p.sf.net/sfu/sfd2d-msazure
>    6. mailto:tmux-users@lists.sourceforge.net
>    7. https://lists.sourceforge.net/lists/listinfo/tmux-users

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to