Live data from Hacker News

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

news.ycombinator.com

71–80 of 85 posts

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

#71
post #70
post #65

Earlier quoted context omitted.

That's something I never understood. I learned tar -xvf young, and that's the only command I've ever used, and it works every time.

I interpreted the comic as meaning not any old tar command line, but a command line for a specific intended purpose. I had a job interview once with a test consisting of a whole list of 20 unix questions, one of which was "you need to do x, y and z in tar, what's the command line?". I got about 5 of them, but spent the 5 minutes critiquing the test and suggesting ways to improve it. I got the job. Apparently my 5 ans…

That's interesting, I always interpreted it as "enter any valid tar command".

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

#73
post #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 m…

May I suggest to use “zipinfo” or “tar -t” to check the contents of the archive before extracting

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

#74
Tangentially, I'm continually surprised at the lack of trivial GUIs for CLI tools. Like, command builders (output is a command you can run/paste into terminal) with procedurally-generated (or hand-built but without much design consideration) widget interfaces - a simple checkbox or line input for each option, with helpful concise tooltips. Training wheels for CLI.

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

#75
Good:

For interactive shell scripting:

- AWK. Old enough to be part of the POSIX standard and yet considerably more awesome than almost any other UNIX command.

- socat for any kind of network/socket testing stuff.

- sponge and entr just for their genuine usefulness with minimal interface.

For interactive use:

- SSH. I mean, obviously. It's also astounding how well OpenSSH integrates into the whole *NIX TTY landscape. You can use it for years and still learn neat things about it.

- Vim. Yes, it's obscure to learn, but once you do, boy do you get a lot out of it. Also: Since `:terminal`, working on one-off scripts has become considerably more awesome.

- htop and btop++ are good examples of TUIs for interactive use.

- tig is also quite cool for many git interactions (especially partial staging).

- lnav for log analysis tasks.

For batch jobs you set up and trigger as needed:

- Beets (see: beets.io). It's impressive how streamlined it works once you've set it up.

Bad:

- Pretty much anything Microsoft. I really don't understand how it's possible to consistently produce bad CLI programs for such a long time.

- As a prime example, have a look at `sc sdshow` and `sc sdset`.

Edit: Perhaps to clarify about the sc SDDL commands:

If you look them up, you won't find much "bad" in their documentation. Because nothing about the SDDL syntax they are built on is documented. The best you can do is scrape together what you can from third-party blogposts with a perceived signal:noise ratio of .000001.

And SDDL in itself is phenomenally badly designed. And, of course, this being Microsoft, the tool isn't designed to be used together with other programs.

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

#76

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.

If someone comments “git is fine once you get to know it” I might reach through the internet and slap them.

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

#77
post #71
post #70

Earlier quoted context omitted.

I interpreted the comic as meaning not any old tar command line, but a command line for a specific intended purpose. I had a job interview once with a test consisting of a whole list of 20 unix questions, one of which was "you need to do x, y and z in tar, what's the command line?". I got about 5 of them, but spent the 5 minutes critiquing the test and suggesting ways to improve it. I got the job. Apparently my 5 ans…

That's interesting, I always interpreted it as "enter any valid tar command".

That's the most obvious interpretation, but it doesn't really make much sense. At the end of the day, I suppose it's just a joke that tar command line arguments are bizarre and arcane.

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

#79
post #41

I worked in a campus bookstore with an old terminal system to access the inventory database. It was a simple text interface. What I loved about it was that the commands to navigate were quick to learn (key was first chars in command) and the response time was instant. So you could jump to any part of the system with a few keystrokes ingrained in muscle memory.

Do you have more details about software?

I don't have details about that software, but there was something which I remember from the early 90's or so: software our church had for clerks -- "MIS" for membership info, and "FIS" for finance. A clerk would use one or both of those weekly or more, and they fit the above description perfectly. I missed them when they moved to a graphical UI.

Similarly, I always thought the UI of "git commit --interactive" was at a sweet spot of being both helpful and efficient, once I got used to it.

(All the above inspired the UI of the knowledge manager I wrote/provide at http://onemodel.org -- AGPL, I use daily and rely on it for many things, currently requires user to perform postgresql installation & upgrades; hoping to move to sqlite someday, when health allows. But most people, especially non-keyboard-oriented people, probably wouln't like its UI. It is perfect for me: very efficient/effective and everything you need to know is on-screen.)

And vim & tmux are things of beauty, after the initial investment (ongoing, for vim).

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

#80

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.

For me, the fact that there are so many who really like git makes it worth recommending a cheat-sheet (or put up with it) for the rest, just to be compatible and have fewer tools to deal/learn with overall, but yes there are reasons some like svn, hg, or fossil. But there are also "got" (currently on openbsd at least) and other convenience tools.

I also found myself making myself a "gh" script to make finding/opening the right git manpage easier/quicker.

I always thought the UI of "git commit --interactive" was at a sweet spot of being both helpful and efficient, once I got familiar with it the first time. It is easier to remember than command-line options. Related UI details in another comment in this page.

Post reply on HN