top | item 37100982

(no title)

gnuvince | 2 years ago

Select the line, then type

    C-u M-| jq -c sort

discuss

order

gumby|2 years ago

I've been using Emacs for over 40 years but still find the shell my go-to sorting approach. Right tool for the job and all that.

JNRowe|2 years ago

I lean a fair bit in the opposite direction. If a sort is any more complex than -n or -k<number no flags>, I tend to vipe¹ my sort in my editor.

It feels great when you can use narrow-to-region² to perfect a complex address or write a custom function with all your editor's power at your fingertips. With the sad, but obvious, drawback that the changes aren't linked in your disjoint shell and editor history.

¹ https://manpages.debian.org/jessie/moreutils/vipe.1.en.html

² Nowadays, that is more likely https://github.com/chrisbra/NrrwRgn for me.