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.
Or with Boston compression active: "Heyhowarya"
Unix used to have a glob command, rather than building it into the shells (and the C library). I think it was 7th edition that added it directly to Bourne shell.
gci -F<tab> *.txt -force
In this particular case I would type the word force out but with other parameters starting with `f` I would just use <tab> until I get the right one.With longer commands, auto complete is also viable. I hate some long forms, like % vs ForEach-Object and ? vs Where-Object, its just ludicrious that someone would insisit in using full forms of those.
Things like `ps | ? name -like w*` or `1..10 | % { irm https://.../$_ }` can't really get shorter and I use them all the time
Auto complete on params is epic. Type -e and ctrl space to see all params starting with e along with their aliases. Verbosity is good thing in that case, as -ea doesn't mean much when you are new to this.
ps -e<CTRL+SPACE>
ErrorAction ea ErrorVariable ev
The verbose practice is not meant for interactive use, but for sharing scripts.