this post was submitted on 28 Sep 2023
312 points (97.0% liked)

Linux

48655 readers
1748 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
312
modern unix (github.com)
submitted 1 year ago* (last edited 1 year ago) by folak to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 28 points 1 year ago (3 children)

"bat" seemed interesting, until I remembered that I'd just do a "git diff" if I wanted to see a diff. The rest do not strike me as substantially better than what they're trying to replace. Enjoy them all as you will, but I would recommend refraining from describing them as "modern unix" in the presence of any old-timers.

[–] [email protected] 22 points 1 year ago* (last edited 1 year ago) (2 children)

Quite a few are just better, and others have the chance to get better because they're actively accepting new features contributions.

One I personally use:

  • delta Provides a better diff for code than git's diff tool (even after trying all of git's diff algorithms)
  • ripgrep So much faster than grep. Also had great include/exclude file filtering, easier to use than grep's
  • jq Easy to exact json info. I tend to use rq too for yaml
  • instead of mcfly I use atuin, which is another alternative bash history. I really didn't think I'd like it, but it's been a big productivity boon
  • curlie/httpie A really nice alternative to something like postman when debugging HTTP connections. I use httpie rn but might switch because I'm so much more familiar with curl's flags, but like the formatted output. There's a few others I use that aren't on the list too.

It's totally fine to not want to change what's working for you, but if you do that too long you could miss out on something that just works better in your workflow. Give em a go and complain after you switch back.

[–] [email protected] 9 points 1 year ago (1 children)

I love jq, but the rest doesn't appeal too much to me -- I've been in the game for so long, so I already memorize most useful flows in the normal corelibs. And because I won't always have the alternative to install different stuff, I try to not depend on lots of non-standard software. But I'm glad you like it, FOSS is awesome.

[–] [email protected] 7 points 1 year ago

This used to be exactly what I said too, I still run bash as my terminal so when I remote it works the same way. I'm the girl everyone asks when they need a one liner, I read through the sed/awk man pages for fun, and I can skim a script and tell if it's posix compliant. But I finally realized I already know that stuff. When I'm developing locally I should be as productive as possible. When I'm running stuff remotely I can worry about whether the environment is gnu, bsd, or busybox.

[–] [email protected] 2 points 1 year ago

Well, I did overlook jq in there. Not the first time I've forgotten that it exists.

[–] GlitzyArmrest 10 points 1 year ago

I use bat as a drop in replacement for cat (overriding cat in my .zshrc) by using --style=plain --paging=never on the bat command. Basically looks and works the same as cat, except with syntax highlighting.

[–] [email protected] 2 points 1 year ago* (last edited 1 year ago) (1 children)

Bat also adds lots of stuff to the output. Is there a clean print functionality without the extra numbers?

Edit: but with the parameters its great!

[–] GlitzyArmrest 4 points 1 year ago

--style=plain will do it!