Skip to content(if available)orjump to list(if available)

Some terminal frustrations

Some terminal frustrations

115 comments

·February 6, 2025

exmadscientist

> inconsistent command line arguments: is it -h or help or –help?

I've said it before and I'll say it again: the error "Option `--help` not understood, did you mean `-help`? Use `-help` to display program options." is one of the most insulting things a program can say to me. `--help` is the lowest common denominator. You have to support it. I don't care what your program has to special case in its parsing, just do it. If I knew your program's preferred syntax, I wouldn't be asking it for help.

swiftcoder

The fact that they already special-cased the parser to let you know that you used the wrong help option, but didn't just forward to the right one, is just incredibly pedantic

ithkuil

It's probably fuzzy similarity search

idle_zealot

Is it? It is helping you. Your first tip: here's what the argument syntax looks like, use it.

swiftcoder

It's "helping" in an incredibly pedantic and unhelpful way. The developer has opted to add explicit support for the common option, but only as a means to tell the user that they are "holding it wrong" (in the immortal words of Apple)

Arnavion

`--help` is a GNU convention, which is why it's not as universal as you want it to be. Of course these days most Linux users interact with GNU tools and thus go on to develop their own tools with the same convention, but it's the reason why non-GNU things like BSD utils or old `openssl` don't have it.

xboxnolifes

--help isn't even the lowest common denominator. An incorrect argument list is. The program knows it was given incorrect arguments, it should show help.

exmadscientist

Many programs prefer to be concise when their arguments are wrong, perhaps on the assumption that it's probably a simple typo rather than a request for screenfuls of help information. This sometimes is and sometimes isn't an ergonomic choice. (I usually prefer conciseness.)

But asking for `--help` is unambiguous, and is in fact the lowest common denominator way to be explicit about it.

linsomniac

Very few things grind my gears like having to search through a wall of "--help" output and lengthy list of arguments to find the error that describes the problem. Screenfulls of text when the error is "Option 'b' unknown" isn't helpful.

dfox

-? should be lowest common denominator, because that is exactly equivalent to passing incorrect argument list when using getopt(). Whether that should produce concise help of the kind "usage: foo -abcdeEf <file>" or full help is another question.

GoblinSlayer

>--help isn't even the lowest common denominator. An incorrect argument list is.

--help being an incorrect argument does the right thing, yes.

crabbone

Sometimes, arguably, you can do better. For instance, some CLI tools try to guess what the user was trying to accomplish, and show a more specialized message. Eg. kubectl will tell users that a particular kind of resource they were looking for doesn't exist, but there are some with similar names.

This is especially useful in situations where the help text is enormous (dozens and dozens of options).

bouke

Or database clients (e.g. psql) using `-h` for the host argument. I get it, but I don't like it.

viraptor

-H is right there and available. But they chose to be slightly weird...

oliviergg

Atuin.sh solved all my problems with history: history by project : check, history by session :check, global history: check. And if you want you can share history between computers. I just have to enter 2-4 letters and I can found complex command to rerun or to reuse as example.

pridkett

Prior to using Atuin, I had some fun fish plugins that used fzf to search my history. I still find that I use that most often (it even searches my atuin history too), but when that fails - or becomes overly complicated, that’s where atuin’s native search comes in. It really is a game changer for working on the console and I can’t recommend it enough. Here’s some of the things that are really great about it:

1. As mentioned above, scope awareness when searching history. This can be exceptionally helpful when you know you’re in the same directory where you previously ran a command.

2. Sync - this is why I started with atuin. It’s pretty easy to run your own sync server if you’re not big on send your commands to some random server somewhere.

3. Persistence - similar to sync, I love having my whole command history available when I stand up a new machine.

4. Secrets hidden - you can even set it so secrets are not persisted in your history. This is useful if you haven’t yet migrated to using something 1Password to inject secrets. Also, as a side, it makes it really easy to find secret references you’ve used before too.

ellieh

(hey! atuin maintainer here!)

Thank you for the kind words! Glad you find Atuin useful!

> It’s pretty easy to run your own sync server if you’re not big on send your commands to some random server somewhere.

We always intended to keep it easy to run a sync server! But also fwiw, sync is e2e encrypted, so we can't actually see anyone's commands

laktak

I find the history much too unorganized to be useful. That's why I made playbooks https://github.com/laktak/tome

ymmv but I prefer this to searching.

hoyd

Same

terminaltrove

> discoverability (55) There were lots of comments about this, which all came down to the same basic complaint – it’s hard to discover useful tools or features! This comment kind of summed it all up:

> How difficult it is to learn independently. Most of what I know is an assorted collection of stuff I’ve been told by random people over the years.

This is all too true, the discoverability aspect is one of the reasons why we exist (0), and there is lots to improve here for discovering terminal tools, how to install and use them.

Also thanks for running this survey Julia.

Also, let us know on what we can improve on the site if you find Terminal Trove useful for you.

(0) https://terminaltrove.com/

zxexz

I checked out your site (excellent content and very, VERY useful), and I came back comment with what I think is similar feedback that other commenters have.

I would suggest a few things -

1. Less resource intensive site - I’m on my phone, and it took probably 5 seconds to load the front page, and then to actually get to the list, it took a few seconds more. I do not have a current gen phone, but I’d hazard a guess that my phone is about average in age as far as the potential user-base for this site goes! Do not discount mobile users, especially for a site focusing on CLI applications.

2. Maybe I care what language a CLI utility is written in sometimes (Albeit, I can’t recall a time when I have). I’d add a search in the front page, if well thought out. Or, honestly, I’d just have the front page be the list. People are great at lists, and generally quite good at reading, and your list has very well-written descriptions.

3. Kinda related to the above, but I think the categories view is effectively useless. The categories already appear in the description (and if they don’t, they probably should) - so why not just skip straight to the list? You could add a filter for the list if you want. Or, even better - a simple search box!

I’m only giving these criticisms as a means to (subjectively) improve your site, because overall I think it is very well done and thoughtful, without a lot of fluff. There are hundreds more I’d not have criticized, but only because they felt like a waste of time and dead weight. Keep up the good work!

armanckeser

Cool site! Personally, I think the weekly highlight is nice and all, but the value of an aggregator comes from categorization and searching, and I didn't see either on the site. I would love to see it's focus to be like selfh.st

terminaltrove

Thanks for the feedback,

We have categorization here:

https://terminaltrove.com/categories/

Is there anything we can improve here that can make this easier for you?

We will consider searching on the website, what would you search by or search for if this feature existed?

elashri

> Is there anything we can improve here that can make this easier for you?

No OP but it would be nice to include link to categories in the header bar. It would make it easier. the dynamic animation of the categorizes at the middle of the page is annoying. You have it in very small font in the footer but this isn't the best.

maleldil

I like vivid[1] for managing colours in the terminal. It sets LS_COLORS to configure colours for many tools in one command.

[1] https://github.com/sharkdp/vivid

InfinityByTen

Making command line tools at work really made me appreciate the work it takes to make a good one.

Do you have a good `--help`? Did you catch the common mistakes and return a helpful error message? Did you put reasonable defaults? Do you have enough examples on how to actually use it: not just one running example, but actually one that uses at least _some_ of the options.

Your UX instincts do get tested in this.

crabbone

I didn't realize until now how many problems I avoided by using Emacs and ansi-term (and usually tmux running in it). Stuff like struggling with color schemes or remembering key bindings... I just solved them once many years ago and don't even remember anymore how I did it. Same for copy and paste.

A lot of problems mentioned in the survey aren't really problems with the terminal, but, I guess, respondents didn't care about that kind of precision. Like... AWK syntax isn't a problem with terminals at all.

oneeyedpigeon

Whatever version of find I have installed, it's an incredibly bad actor:

  > $ find --help
  > find: illegal option -- -
  >
  > $ find -help
  > find: illegal option -- h
  >
  > $ find -h
  > find: illegal option -- h
I say "whatever version" because I cannot find that out either. A bare `find` doesn't tell me and I get similar non-support for --version / -v.

slightwinder

Have you tried finding its path and looking into the file itself? Maybe it's a wrapper or alternative version somewhere in your $PATH you installed and forgot?

And to add some mor efor testing: you can try "find /help", "find /?" and "find -?", in case it's using dos-style parameters.

oneeyedpigeon

  > $ file `which find`
  /usr/bin/find: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e]

  > $ find /help
  find: /help: No such file or directory

  > $ find /?
  zsh: no matches found: /?

  > $ find -?
  zsh: no matches found: -?

achierius

If you have brew you can install findutils to get gfind which behaves more like you'd expect

kristopolous

My current secrets:

* cht.sh is a great way to avoid a lot of this stuff - there's a commandline tool as well

* usable cli ai setup: simonw's llm (https://github.com/simonw/llm) + openrouter (https://github.com/simonw/llm-openrouter) + free models (https://openrouter.ai/models?max_price=0) + glow (https://github.com/charmbracelet/glow) + adding this to your .rc file:

     function lm {
       local input="$*"
       llm -s 'Answer as short and concise as possible'  ${input} | glow
     }
Here's an example,

    $ lm "ssh command to forward the port 5050 on user@remote to my localhost:7001" 
      ssh -L 7001:localhost:5050 user@remote                                        
    $
Now for a sophisticated use-case I have a small tmux program where I can capture what's on the pane, enter a prompt and it will query an llm so I can say things like "How do I fix this error" or "what debian package do I need to get this to run right?" ... both these are recent patterns I've started and they've been real game changers

Some lesser game-changers:

* tmux extrakto - opens an "fzf" like search of all the text on the screen. So after a "git status", I can do git add (run extracto - enter partial path, press tab) and continue: https://github.com/laktak/extrakto

* mcfly history: https://github.com/cantino/mcfly just watch the demo, you'll see

* ugrep: grep with a powerful tui: https://github.com/Genivia/ugrep - I became an instant convert.

* batcat: https://github.com/sharkdp/bat ... you really need to use some of its other features to leverage it. It's really nice.

scottyeager

Here's my take on an LLM based shell helper for command suggestions and more: https://github.com/scottyeager/Pal

It features an integration with the abbreviation feature in fish and zsh (via plugin) to expand the suggestions for editing, if needed, and execution.

There's stdin support, which can be used to pipe in error messages, for example. I've thought about something like your tmux setup to capture and pass some history to the model, but in practice redirecting stderr handles most of the potential use case.

regnull

I did a similar thing, where you describe what you want to achieve and it gives you the command and (optionally) executes it for you:

https://github.com/regnull/how.sh

kristopolous

I see you did some prompt engineering: https://github.com/regnull/how.sh/blob/main/how.sh

I think the real sweet-spot flow is to take this and use bindkey to do inline replacement. Let me fork it and see what I can do.

ddworken

I actually made a CLI tool (https://github.com/ddworken/hishtory) that automatically binds to Control+R to support both history searching and AI queries (by prefixing queries with `?`).

Here's the prompt engineering I did: https://github.com/ddworken/hishtory/blob/master/shared/ai/a...

regnull

Yeah I tweaked the prompt to make it work reasonably well. There is also an experimental mode where it can reason and correct the command if it fails. Feel free to sent a PR!

p0w3n3d

Am I the only one to whom the term _terminal frustrations_ sounds like things that frustrate you and then you die?

smackeyacky

I have often thought it would be fun to have a Smalltalk like interaction screen, where you could leave snippets of code lying around and a “do it” menu item.

Kind of like how most of the SQL systems like dBeaver work. I have a scratchpad of SQL in a file I use for fiddly jobs, and a file like that for shell commands would be good if it had all the flags for awk or grep or whatever handy.

Would also be cool for the AWS and azure cli tools. I had something half working as an old VisualWorks experiment that implemented an AWS service on one side and a scratchpad in the middle but I feel like it might be a very cool vscode extension instead.

__s

For colorsheme allow me to suggest https://github.com/savq/melange-nvim

Has configs for multiple programs, is warm (low blue light), avoids too many colors / clown vomit

I was considering giving up on colors with zenbones before I found this

For copy/paste I'm using a 36 key keyboard, ctrl is on a thumb key hold, while holding , is shift-ctrl. But that's probably not as generally useful to others

rcarmo

slightwinder

Detector seems a bit off when it also includes the item-id where it's posting.

tonymet

Is this a bot?

rcarmo

Nope. Just someone who also submitted this earlier as well. I think HN’s dupe detection is off these days.

asicsp

I think the dupe detection works only if there had been substantial discussion before, which none of the previous three had in this case.

null

[deleted]

fragmede

does it matter if it is?

wutwutwat

It matters to the person above, which would be why they asked the question.

That's generally how question asking goes...

tonymet

Isn’t this the forum for the technically curious? So yes, it matters.