Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by internet_points

1 year ago

With `xsel --clipboard` (put that in an alias like `clip`), you can use the same thing to replace both `copy` and `pasta`:

    # High level examples
    run_some_command | clip
    clip > file_from_my_clipboard.txt
    
    # Copy a file's contents
    clip < file.txt

    # indent for markdown:
    $ clip|sed 's/^/    /'|clip

1 comment

internet_points

Reply

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities