Comment by kstrauser
3 hours ago
Yup. IMO the syntax is unusably awful for interactive sessions. Scripting, where you want to come back a year later and tell at a glance what it's doing, sure. Not for daily driving though.
It feels like the difference between old-timey classical English vs street talk. "Greetings, dearest companion, how fare you this fine Autumnal day?" is a lot of syllables for someone you're familiar with. "Hey! Enjoying the day?" says the same thing, but conversational. There's a time and place for the former, mainly when writing dialog set in 1500 or something. I'd much rather say the latter when bumping into my neighbor at the cofee shop. Similarly, I could see why someone might want to write
Get-ChildItem -Filter *.txt -Force
in a script so that it's clear-ish what that means later, but if I'm spending my time in a terminal, I'd vastly rather learn what
ls -la *.txt
means. It's terse to the point of inscrutability, and not beginner friendly at all, but once you type it a few thousand times it's second nature.
All things considered, I'll stick to Fish, thanks.
Edit: Related, but once I learned how Unix shells typically expand globs, that feels like the right layer for handling that and similar other things. "ls" doesn't know what a glob is. When you type "ls -la .txt", the shell* expands that into a list of matching files, like "ls -la foo.txt bar.txt baz.txt", then "ls" operates on each one of those in turn. You don't have to teach every program how to interpret globs. The shell has to learn that, once, then every other program automatically benefits from it. Type "echo *.txt" and you'll see the list of matching names. Echo has no idea what that means. It only knows that it got a list of worlds to write out with no idea where it came from. I think Bash/zsh/fish/etc. do this the right way, and that implementing that in every tool is the wrong way. It just feels weird and inefficient and prone to have odd, subtle deifferences.
No comments yet
Contribute on Hacker News ↗