Hacker News new | ask | show | jobs
by copperx 2807 days ago
> CLI is like speech.

You must be kidding here. CLI is like speech only if imagine you are in a completely dark room full of people, and you can't talk to anyone unless you know their name and their job description, and although you can get a list of names, you need to figure out the job descriptions yourself.

On top of all that, everyone speaks a slightly different dialects, the adjectives and verbs are slightly out of order. And although that's not hard to memorize, you have to speak flawlessly in order to be understood.

2 comments

Hmm? Apart from the "dark room" bit, how is it not analogous? "Get the bag of chips." Who? Which bag of chips? What is the context?

If there is a special context say, there is only one person and one bag of chips, which is similar to there being one file and one program to open it with certain options say, and you do it often enough, an apt shell user would bake that into either an alias or a short shell script. It's rare that I use more than 4 options on a command before baking it into a script. That's very analogous to language: things like slang, contractions, and sayings that make sense in certain contexts form naturally between people or even in some situations, are decided explicitly.

Of course, come times of ambiguity, then you have to explain yourself, just like when a script you usually use as a shortcut doesn't match a certain need, and you crack open the original call, which man helps with, and may be you write another script if need be.

That's entirely not true, the shell remembers a lot for you, the current state and the execution of commands can depend in any measure on environment variables and set them, also current directory and time of day, calling script, current history, the name used to call the script (if it has many links), your current line of input (in autocompletion handler).

The shell can also indicate it's state however you want - synchronously, asynchronously, before every input (PS1, PS2, etc.)