by slightwinder · 6y ago · 0 comments
Is this really a problem of CLI or just an example of a complex application? If we take for example something like excel or photoshop, then you can't easily figure what to do, even if the doc is directly embedded inside the UI.
> Back to discoverability, is there a way to make CLI "more discoverable"? Reading the man page doesn't count.
Why? It's an additional step, but can count as basic knowledge, similar to how someone needs to know how a mouse works and what the buttons do, before they can start using a GUI.
> Like can we combine the advantages of CLI with the discoverability of GUIs?
No, the moment you embedd the discoverabilty of GUI it stops being a CLI. TUI exist, and they do offer the same elements as GUI, just with less flexibility because text and so. But TUI serves a different purpose. You can't automate spatial interfaces as you can automate a cli. You need a dedicated way for allowing this, which is the main reason why CLI is so popular.
What you could do is defining many many APIs and protocols and guidelines, then define your interface in some generic way which allows you to automatic spin out a discoverable interface as also a useful automation-interface. But who wants that? That is extra work.
Similarly, how many people have trouble saving and quitting a word document? What about vim?
A command line interface can do with very little screen real estate. There's no reason GUI and command line can't coexist, with everything you do in the GUI immediately being reflected in the command line, and vice versa. This combines the context visibility and flexibility of a GUI with automatability and composability of a CLI. And you learn both at the same time.
That statement is falsified by the advent of programmable completions. Nothing stops us from integrating context sensitive help into the shell completion mechanism. The shell could display a help text next to each item of a completion list, or you could press keyboard shortcut to get help to the command your cursor is positioned on. shellcheck could highlight a bash command while you are typing it. All that would not change the fact that a shell is a CLI.