Live data from Hacker News

Ask HN: What are the best and worst command-line interfaces you have used?

news.ycombinator.com

11–20 of 85 posts

Re: Ask HN: What are the best and worst command-line interfaces you have used?

#11

worst is git by far. i'm used to it now but when I was learning, "what the fuck did `git reset --hard` do? where is --soft? Is there a no-flag version? What the fuck did I leave mercurial for. God damn I miss svn." I still kind of miss Mercurial and TortoiseHG.

Agree it is one of the most unintuitive cli I have ever used. If it’s really just manipulating a DAG, I wonder if a rewrite is possible with this in mind.

Re: Ask HN: What are the best and worst command-line interfaces you have used?

#14
The combination of mosh and screen has been a big productivity booster for me. The shell alias server1='mosh root@server1 -- screen -xRR -D' keeps the connection forever even if I change networks.

The only pity is that mosh breaks compatibility with earlier versions once in a while.

Re: Ask HN: What are the best and worst command-line interfaces you have used?

#15
Nearly everything that packs or unpacks stuff. tar, gunzip, and else. I can never remember if they are going to unpack everything into a subdirectory or spill everything into my home, and conversely I never know if after zipping there's gonna be a directory inside or not. Luckily dtrx and atool do the thing you want most of the time.

From the time I was a teen I think I remember that mount was difficult to use, and mounting a CD image required passing some arcane options, though maybe I just didn't know how to use it (on the other hand I didn't know how to use Daemon Tools either, and it just worked).

I don't have a problem with git though. I don't think it's the command-line interface that's hostile, it's git itself if you don't know what you're doing. After taking some time to learn it I actually enjoy solving difficult problems with git.

Re: Ask HN: What are the best and worst command-line interfaces you have used?

#16

worst is git by far. i'm used to it now but when I was learning, "what the fuck did `git reset --hard` do? where is --soft? Is there a no-flag version? What the fuck did I leave mercurial for. God damn I miss svn." I still kind of miss Mercurial and TortoiseHG.

The worst thing about git is how commands are inconsistently overloaded.

`git reset` both unstages files (opposite of `git add`, straightforward enough) but also can move the current HEAD pointer to an arbitrary commit. You’d think it could then also discard unstaged changes, but nope, that’s `git checkout -- …`, which incidentally has nothing to do with `git checkout`’s other functionality of switching branches.

There are so many other examples of this. `git rebase` can not only rebase but also combine and reorder commits via `rebase -i`, which seems totally unrelated to rebasing. `git branch` and `git checkout` have overlapping but also distinct functionality. I could go on for hours.

Re: Ask HN: What are the best and worst command-line interfaces you have used?

#17

To me, openssl and nmap are the worst. Kubectl is among the best: commands make sense and have internal logic, interface is discoverable, output is configurable and supports different formats.

Nah. Kubectl is so verbose that it reminds me of typing xslt in my younger years.

k9s would save us all from carpal syndrome, but it's a curses UI, not a cli.

Re: Ask HN: What are the best and worst command-line interfaces you have used?

#18

worst is git by far. i'm used to it now but when I was learning, "what the fuck did `git reset --hard` do? where is --soft? Is there a no-flag version? What the fuck did I leave mercurial for. God damn I miss svn." I still kind of miss Mercurial and TortoiseHG.

100% agree with this. The nomenclature of the commands always felt too similar for different things to me, i.e. reset vs revert, checkout vs fetch vs pull. Feel like there could be much more descriptive and distinct names.

Re: Ask HN: What are the best and worst command-line interfaces you have used?

#19

To me, openssl and nmap are the worst. Kubectl is among the best: commands make sense and have internal logic, interface is discoverable, output is configurable and supports different formats.

openssl reminded me of gpg, wow, this one is horrible, and manuals don't help at all.

Re: Ask HN: What are the best and worst command-line interfaces you have used?

#20
post #9

The ImageMagick utility mogrify. By default (without specifying extra command-line options) it overwrites the input files. [1] In decades of computer use, that is the only command line tool that tricked me into destroying my data because I didn't realize it works differently from all the other tools I use that don't do that. Usually, a command line utility with less options specified is relatively "safe" and you have…

> mogrify - resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more. Mogrify overwrites the original image file, whereas, convert(1) writes to a different image file.

The whole reason for mogrify's existence is that it overwrites the original image file.

Post reply on HN