Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`pbcopy` and `pbpaste` for copying to / pasting from clipboard. Nice time savers!


In a similar vein, I have a shell script (fish, in my case) that combines these to let me quickly modify the contents of the clipboard:

  function pbedit
      set tmpfile (mktemp /tmp/pbedit.XXXXX)
      pbpaste > $tmpfile
      if vim -c "set nofixeol" $tmpfile
          pbcopy < $tmpfile
      end
      rm $tmpfile
  end




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: