FAQ
Login
GNU social JPは日本のGNU socialサーバーです。
Usage
/
ToS
/
admin
/
test
/
Pleroma FE
Public
Public
Network
Groups
Featured
Popular
People
Embed Notice
HTML Code
<blockquote style="position: relative; padding-left: 55px;"><section><a href="https://social.jvns.ca/users/b0rk/statuses/114462343920459778">Julia Evans (b0rk@social.jvns.ca)'s status on Wednesday, 07-May-2025 03:40:50 JST</a><a href="https://social.jvns.ca/@b0rk" title="b0rk@social.jvns.ca"><img src="https://gnusocial.jp/avatar/88850-48-20230116234922.webp" width="48" height="48" alt="Julia Evans" style="position: absolute; left: 0; top: 0;">Julia Evans</a></section><article><p>copy and paste in the terminal</p></article><footer><a rel="bookmark" href="https://gnusocial.jp/conversation/5013891#notice-9827697">In conversation</a><time datetime="2025-05-07T03:40:50+09:00" title="Wednesday, 07-May-2025 03:40:50 JST">about 2 months ago</time> <span>from <span><a href="https://social.jvns.ca/@b0rk/114462343920459778" rel="external" title="Sent from social.jvns.ca via ActivityPub">social.jvns.ca</a></span></span><a href="https://social.jvns.ca/@b0rk/114462343920459778">permalink</a><h4>Attachments</h4><ol><li><label><a rel="external" href="https://gnusocial.jp/attachment/4586070">Panel 1: multiline It's SO scary when you paste a bunch of commands by accident and then it runs them all.fish, zsh, and newer bash versions protect you from this: you have to press Enter before running the thing you pasted. This is called "bracketed paste"panel 2: problem: copying with the mouse can go wrong- copying 400 lines of text by dragging is nobody's idea of a good time - sometimes extra whitespace that you didn't want gets added at the end of linespanel 3: person: “copying a LOT of text is way easier if you don't use the mouse! Here are 2 tricks for copying without the mouse. "panel 4: copy trick 1: pbcopymacOS comes with two programs that can copy from stdin / paste to stdout, like this:cat main.go | pbcopyThey're SO useful and on Linux I like to write my own versions of pbcopy/pbpaste using xsel or xclippanel 5: pbcopy over SSHyou can even implement pbcopy over SSH (yes really!) with this bash one-liner.It uses an escape code called "OSC 52".printf "\033]52;c;%s\007" "$(base64 | tr -d '\n')"panel 6: copy trick 2: syncing the vim clipboardI use vim as a terminal text editor, and I find it's WAY easier if I sync my system clipboard with the vim clipboard like this:set clipboard=unnamedtmux can also copy to your system clipboard.</a></label><br><a href="https://cdn.masto.host/socialjvnsca/media_attachments/files/114/462/343/580/800/518/original/8c6566d3028dd264.png" rel="external">https://cdn.masto.host/socialjvnsca/media_attachments/files/114/462/343/580/800/518/original/8c6566d3028dd264.png</a></li></ol></footer></blockquote>
Corresponding Notice
Embed this notice
Julia Evans (b0rk@social.jvns.ca)'s status on Wednesday, 07-May-2025 03:40:50 JST
Julia Evans
copy and paste in the terminal