3 ms·
It's not two aliases, it's also that Verb-Noun two word rule instead more sane two letter rule, which is better suited for interactive use. That this decision w
by throw_a_grenade 3y ago
It's not two aliases, it's also that Verb-Noun two word rule instead more sane two letter rule, which is better suited for interactive use. That this decision was made for the purpose of noise abatement (every character was loudly hammered into a paper by a printer) doesn't make it any less valid today and we still prefer less keystrokes, even on today's silent terminals.
I don't care much about parsing CLI parameters, because after some time they get into muscle memory. Yes, I know `ps` and `tar` have some different legacy conventions but I don't care. I just type what I've remembered. In this area, only the number of keystrokes (corrected for tab completion) counts.
Also, does "consistent argument parsing" work for regular programs written in normal (non-.NET) programming languages like C, Python or Rust? Because if not, then it's not really consistent, only consistent within a specific ecosystem, which can also be said about `getopt(1)`, `getopt(3)`, click or any other language's argv parser.
- Joker_vD 3y ago> instead more sane two letter rule The what rule? The one that "printf", "curl", "tar", "gunzip" and pretty much every other command don't follow except for "cd", "ls", "cp", "mv", and "rm"? Those two-letter commands are only really needed because UNIX started on paper ttys and follows "ed" in its "don't show current context to the user" philosophy; launch "mc", or use "fzf", and you can forget about them as if they were a scary dream.
- throw_a_grenade 3y agobc, cc, dd, df, du, ip, jq, nc, ps, ss, su, tr, wc, xz are some I use regularly. There are others. But it's not coincidence that the basic file operations you've mentioned are very short: they're the most common used commands in the interactive shell. > Those two-letter commands are only really needed because UNIX started on paper ttys and follows "ed" in its "don't show current context to the user" philosophy Today they need to be short so they're just quick to type. You can set $PS1 just fine and it shows you as much (or as little) context as you'd like. It's only scary to people watching over the shoulder, because it's just faster than anything else. Close second place is Windows 95/98 "Start" menu and "Explorer", both of which also can be operated with keyboard, thought only for browsing directories deeper — and some Linux DEs like Cinnamon menu can also be worked in similar fashion.
- antonyt 3y agoA ton of common pwsh commands have built-in short aliases, sometimes even two-letter ones. They're intended for interactive use, with the verbose forms expected in scripts. New-Item -> ni Set-Location -> sl Get-ChildItem -> gci Invoke-WebRequest -> iwr Get-Help -> help Select-Object -> select