top | item 18249979

(no title)

another-cuppa | 7 years ago

Training yourself to be tolerant of mistakes on the command line seems like a very bad idea. Carpenters have a rule: measure twice, cut once. Train yourself to do the same.

discuss

order

copperx|7 years ago

It's almost like typing commands isn't the friendliest human-computer interface. But because we have been utterly incapable of taking the Unix paradigm to the graphical world, we have settled for the error-prone, zero-discoverability atrocity of a command line.

Don't get me wrong, I love the command line because there isn't a more powerful interface, but I'm appalled to see that there aren't any attempts to make it better. 70 years isn't enough to come up with something better?

bunderbunder|7 years ago

It's a combination of the command line itself, and the actual command line apps.

For me, this is the single biggest use case for thefuck:

  $ git push
    fatal: The current branch my-branch-name has no upstream branch.
    To push the current branch and set the remote as upstream, use

      git push --set-upstream origin my-branch-name

  $ fuck
    git push --set-upstream origin my-branch-name [enter/↑/↓/ctrl+c]

  (enter)

I'm pretty unrepentant about that one - I _could_ waste brain cells on keeping track of whether my branch already exists upstream, and I _could_ waste keystrokes typing out the more verbose command myself. But I'm not gonna. Life's too short.

noobermin|7 years ago

CLI is like speech. Therefore, I don't get for why people think it isn't a friendly human computer interface since it is so close to the original human-human interface. And just like with speech, things can be ambiguous and easily mistook. The way we've dealt with speaking is just learning to speak clearer, not by turning everything we say into a movie.

whateveruser|7 years ago

Every time this point comes up, ultimate conclusion isn't the CLI is bad or can't be improved, but the VT220 and similar emulation that's holding things back. Any person who has developed a terminal emulator can attest to that. There have been and are attempts at a much better CLI, but until we drop the legacy baggage, we can't have nicer things, at least in a sane way. But if we do that, we don't really have enough incentive to use the newer tools. Its a catch 22 after all.

tenebrisalietum|7 years ago

> zero-discoverability

Is your TAB key broken?

Do the letters `ls` and `grep` not work on your keyboard?

another-cuppa|7 years ago

Tab completion makes it significantly better. It's a bit like syntax highlighting. If it doesn't tab complete properly then something is probably wrong.

presscast|7 years ago

I have a linux distro for you: https://qntm.org/suicide

xte|7 years ago

UAU, nice :D

anyway, for accidental files operation protection nilfs2 is a very effective protection, despite super-slow development and actual limited features, it's rock-solid, mainline, live resizable (both grow and shrink) and in years does not loose a bit of information for me :-)

atm0sphere|7 years ago

this is amazing. thanks for sharing.

jeorgun|7 years ago

To that end, I highly recommend the command line utility 'sl', which runs an unskippable ASCII animation of a steam locomotive. Makes for great fun explaining it to the flummoxed coworker borrowing your computer!