4 ms·
Linux is not Unix, that's just fine, I'm happy it is not. I've tried “re-evaluated” shell (Powershell), no, thanks, it's not intended for using by humans. Curre
by sigsergv 11y ago
Linux is not Unix, that's just fine, I'm happy it is not. I've tried “re-evaluated” shell (Powershell), no, thanks, it's not intended for using by humans. Currently shell is still simple and powerful. Powershell is powerful and NOT simple.
- Svip 11y agoIndeed. In PowerShell, you have to write 'programs' to get things done, in Bash (as an example), you write commands to get things done. I'd like to think that commands are allowed to contain shorthands. I don't see a problem with `ls`'s flags, even if they are numerous, because they all help reduce the interaction from programs to commands.
- useerup 11y ago> In PowerShell, you have to write 'programs' to get things done, in Bash (as an example), you write commands to get things done Huh? I use PowerShell (almost) daily. I do not write 'programs'. I use small steps, modify and repeat if the result was not as desired, just as with any REPL. If you are referring to how one creates commands for the shell, PowerShell cmdlets can be written as PowerShell functions or as .NET classes. Not "programs". A very nice feature of PowerShell in that regard, is how the shell performs the parameter parsing. The cmdlet declares the parameters with name, type and optionally position, and the shell does any type coercion from e.g. string to the parameter type. This means that PS cmdlets - unlike sh commands - contain no parameter parsing logic whatsoever - only the logic and declarative parameters. This also means that the information is readily available to the shell (or extensions) to be used for auto suggestions ("intellisense"), tab completion, early error checking etc.
- UK-AL 11y agoWhat does intended for humans even mean? At least powershell has command names that describe what they do.
- dijit 11y agoPowershell is readable but barely writeable. Bash is the opposite, it's very easy to do complex things if you have some basic knowledge. for instance a one liner nested loop to replace a string in a bunch of text files which are a few directories deep. Easy to write but it takes a while to read.
- sigsergv 11y agoGood (==effective) UI does not require commands to be descriptive. Yes, it requires some learning, but then you can use them very effectively. And shell is not a tool for “general audience”, so it's fine to have some initial learning steps.
- bediger4000 11y agoAt least powershell has command names that describe what they do. That's always debateable. Since nobody writes command names that are incomprehensible gibberish (to them), then I think if powershell command names describe (to you) what they do, then good. Almost certainly, a sizeable fraction of any populace will find those command names "unintuitive".
- sudioStudio64 11y agowhat you end up using in bash is actually the defaults that people have come up with after decades of use. taking PowerShell straight out of the box isn't that different from running bash with no config file. I use lots of aliases and custom cmdlets to make things smoother for my particular workflow. PS is still pretty new so a lot of that stuff is still being built.
- sigsergv 11y agoPowershell is hard even with config file. It really requires “coder” mode of thinking.
- sudioStudio64 11y agoThat may very well be...the guy that created powershell always says that Unix is document oriented configuration while windows is API oriented configuration. To do anything in Windows you have to know API's. To be fair someone has to write the code that parses all of those config files in Unix...but I think the over all idea is accurate. They are changing that with PS Desired State Configuration...if you haven't seen it you should check it out. But you are right...it's coming from a different place than Unix shells.