Live data from Hacker News

Show HN: I wrote a modern Command Line Handbook

commandline.stribny.name

51–60 of 115 posts

Re: Show HN: I wrote a modern Command Line Handbook

#51
post #4

Honestly I would’ve liked to fork over cash for a book like this but the deal breaker for me is that it’s in PDF format. I like to read all of my books on a Kindle (with koreader installed) so epub files that can be resized to fit its weird dimensions are a must.

Honestly I would’ve liked to fork over cash for a book like this but the deal breaker for me is that it’s in PDF format. I like to read all of my books on a Kindle

When I made my purchase, the options were Download and Send to Kindle. It's not ePub, but it's something.

Re: Show HN: I wrote a modern Command Line Handbook

#53
post #38

Earlier quoted context omitted.

<3 GNU Make

Make is a powerful self-documentable tool. It can hide tons of complicated dependencies implementation details behind a simple and universal CLI.

If you want to use make, power to you, it’s definitely a useful tool. (What I’m trying to say is I’m bashing make, not you.)

That being said, I absolutely hate make, there are so many footguns and weird quirks and implicit behavior that always end up biting me.

I find that 90% of the time what I actually want is a command runner like Just (https://github.com/casey/just) and have the make file contain the absolute sheer minimum required to build code.

While we’re at it, CMake is another build tool with the same problems as make - powerful, with an ugly syntax, unintuitive semantics, hidden dragons, and a manual that’s torturous to read.

Re: Show HN: I wrote a modern Command Line Handbook

#54

It makes me wonder – what's that one command or concept you CLI vets wish you'd learned way earlier that totally changed your game, something that might be in that 'next 20%'? Curious about those 'aha!' moments!

One of my favorites from the book is to alias "xdg-open" to "open" because I never remember the command. So now I can just type "open X" to open a file system location or file in a normal GUI program when needed. It is a small thing but I use it a lot. Something that I didn't put in the book because I learned it only recently is the use of "notify-send", aka you can send yourself a system notification from the comman…

In my Linux install (Debian 12/Bookworm) /usr/bin/open is a symlink to /usr/bin/xdg-open so I was always using xdg-open without even knowing it.

Re: Show HN: I wrote a modern Command Line Handbook

#55

It makes me wonder – what's that one command or concept you CLI vets wish you'd learned way earlier that totally changed your game, something that might be in that 'next 20%'? Curious about those 'aha!' moments!

  bat     # cat with syntax highlighting
  zoxide  # keeps track of directories 
  tig     # ncurses git viewer
  atuin   # shell history across machines
  choose  # easier cut or "awk '{print $1}'"
  direnv  # set environment vars when you enter a directory
  fd      # better find
  fzf     # fuzzy find anything, total game changer
  gh      # GitHub client
  rg      # really fast recursive grep

Re: Show HN: I wrote a modern Command Line Handbook

#56
post #29

Example pages here: https://drive.google.com/file/d/1PkUcLv83Ib6nKYF88n3OBqeeVff...

Hmm, the example page doesn't convince me, for example > The diff utility can compare files and print their differences. If we pass it the result of ls commands, we can compare the contents of directories. No, if you pass the output of ls commands, you might get an error because you'll pass a bunch of files to diff. And last but not least there's diff -r directory-a directory-b to compare two directories file by file…

I think it was about demonstrating process substitution. You don't pass a bunch of files to diff, you pass the output of ls, as a file, to diff.

I actually thought it was awesome to see that. I use this a lot to diff the output of commands and many people don't know about it.

Re: Show HN: I wrote a modern Command Line Handbook

#57
post #46

Cool, couple of comments. The website it a bit broken on mobile (at least for me) since text goes off the screen. Second, it would be good to have some sample pages or at least a page of contents so people can see the level of detail the book is aimed at. I know I could just get the book for free and then pay later but that kind of a faff and I feel bad choosing $0 for these kinds of things.

I agree with all this. I'm on Firefox android, pixel, lose part of the screen too. I'd love to read a table of contents. I don't want to rip you off with zero dollars! Anyway, sounds like a great book. Congratulations on completing and "shipping"!

> I agree with all this. I'm on Firefox android, pixel, lose part of the screen too.

Ah okay, I really wasn't aware. Thanks for reporting.

Re: Show HN: I wrote a modern Command Line Handbook

#58

Cool, couple of comments. The website it a bit broken on mobile (at least for me) since text goes off the screen. Second, it would be good to have some sample pages or at least a page of contents so people can see the level of detail the book is aimed at. I know I could just get the book for free and then pay later but that kind of a faff and I feel bad choosing $0 for these kinds of things.

I am also seeing text off the screen using Brave on Android.

You are right. It is wrong, will need to look into this.

Re: Show HN: I wrote a modern Command Line Handbook

#59

Earlier quoted context omitted.

Make is a powerful self-documentable tool. It can hide tons of complicated dependencies implementation details behind a simple and universal CLI.

If you want to use make, power to you, it’s definitely a useful tool. (What I’m trying to say is I’m bashing make, not you.) That being said, I absolutely hate make, there are so many footguns and weird quirks and implicit behavior that always end up biting me. I find that 90% of the time what I actually want is a command runner like Just ( https://github.com/casey/just ) and have the make file contain the absolute s…

I agree too, Just (and others) are better as a pure entry point. But when you come to projects that already have Makefiles, or you know you have just one less thing to install in a container... you use Make.
Post reply on HN