Skip to content

Instantly share code, notes, and snippets.

@yoshikaw
Created March 9, 2011 11:07
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoshikaw/862031 to your computer and use it in GitHub Desktop.
Save yoshikaw/862031 to your computer and use it in GitHub Desktop.
CygwinのscreenでコピーバッファをWindowsクリップボードに流し込むっ!
# changes the filename used for reading and writing with the paste buffer.
bufferfile 'screen/screen-exchange'
# copy the screen pastbuffer to the Cygwin pastebord
bindkey -m ' ' eval 'stuff \040' 'writebuf' 'exec sh -c "/usr/bin/putclip < screen/screen-exchange"'
bindkey -m Y eval 'stuff Y' 'writebuf' 'exec sh -c "/usr/bin/putclip < screen/screen-exchange"'
bindkey -m W eval 'stuff W' 'writebuf' 'exec sh -c "/usr/bin/putclip < screen/screen-exchange"'
@comuttun
Copy link

拝借いたしました。

そのままですと、日本語がばけてしまいましたので、少し改変しました。

# changes the filename used for reading and writing with the paste buffer.
bufferfile '/tmp/screen-exchange'

# copy the screen pastbuffer to the Cygwin pastebord
bindkey -m ' ' eval 'stuff \040' 'writebuf' 'exec sh -c "/usr/local/bin/nkf -s /tmp/screen-exchange | /usr/bin/putclip"'
bindkey -m Y eval 'stuff Y' 'writebuf' 'exec sh -c "/usr/local/bin/nkf -s /tmp/screen-exchange | /usr/bin/putclip"'
bindkey -m W eval 'stuff W' 'writebuf' 'exec sh -c "/usr/local/bin/nkf -s /tmp/screen-exchange | /usr/bin/putclip"'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment