TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

One-liner to sort clipboard

1 pointsby lucasgonzeover 8 years ago

2 comments

jeplerover 8 years ago
On X-based systems, xsel -ob | sort | xsel -ib<p>But if you&#x27;re in a high-octane development environment like vi, there&#x27;s no need to resort to a separate terminal window to invoke &#x27;sort clipboard&#x27;. just mark a range of lines (v) then :!sort to filter through good old unix sort.
评论 #12869246 未加载
lucasgonzeover 8 years ago
This is a trivial but super useful hack. The way you use it is:<p>1. You&#x27;re in an edit field in any old app - browser, Atom, vi<p>2. Select lines to sort and ^c<p>3. alt+tab to command line<p>4. pbsort<p>5. alt+tab back to app<p>6. ^v