← Home ← Back to /g/

Thread 106183877

16 posts 4 images /g/
Anonymous No.106183877 >>106183913 >>106183967 >>106186002 >>106186141 >>106186251
Why not just improve the Command Prompt? Why go with the faggy PowerShell or something as faggy as that?
Anonymous No.106183913 >>106183929 >>106183967 >>106186002
>>106183877 (OP)
powershell is actually incredibly powerful. far more powerful than the shell used in command prompt. microsoft created powershell to compete with bash and all the other linux shells + their tools.
that said, powershell is object orientated and that annoys a lot of people. as most are used to a shell that treats everything as a file.

example:
>grep -i pie
powershell way:
>Select-String -Pattern "pie" -CaseSensitive:$false
Anonymous No.106183929 >>106183938
>>106183913
So you have to treat everything as an object and its syntax is also retarded.
Anonymous No.106183938
>>106183929
object vs text have their pros and cons. but powershell syntax is really retarded.
Anonymous No.106183967 >>106186019
>>106183877 (OP)
I have considered this, as I have been playing with nushell and it is very nice, it makes me wish a drop in replacement for cmd existed, with a little bit more functionality

>>106183913
in nushell this is
>find "pie"
Anonymous No.106186002
>>106183877 (OP)
Because %COMSPEC% had decades of backcompat baggage to deal with. It was easier to just make a new shell - though I agree, PowersHell is one of the least appealing ways to go about it.
Having said that, as >>106183913 mentions, it's power is undeniable, and if it didn't look like Troonix line noise crossed with C#, I'd probably have a far higher opinion of it.
Anonymous No.106186019 >>106186080
>>106183967
>in nushell this is
>>find "pie"
so how do you call the real find command?
Anonymous No.106186080 >>106186310
>>106186019
By typing find.exe or findstr.exe, depending on which flavour you want.
Anonymous No.106186141
>>106183877 (OP)
batch syntax of %~n0 & ^ for %%i goto:eof exit /b is extremely difficult to build on
microsoft knew it was a garbage heap so they replaced it with another shit shell
Anonymous No.106186251 >>106187270 >>106187325 >>106187727
>>106183877 (OP)
cmd has INSANE amount of backward compatibility hacks, workarounds and weird behaviors Microsoft had to do to keep ancient popular software running well. No one will appreciate if their legacy enterprise .cmd scripts suddenly stop working.
you can do a LOT of with plain cmd even now, the only difference from bash is array of lunix command line tools which all explode with any kind of advanced scenarios

look what lunix users have to do to process json, it's pathetic: https://stackoverflow.com/questions/1955505/parsing-json-with-unix-tools
powershell has convertfrom-json and objects and everything's a breeze
Anonymous No.106186310
>>106186080
so it's windows only?
Anonymous No.106187252 >>106187489
Powershell is powerful.
Anonymous No.106187270
>>106186251
>it's pathetic
>one simple tool
Anonymous No.106187325
>>106186251
https://jqlang.org/
jq is uninronically better than what powershell has. Yes powershell has it built in but that's the differences in shell design philosophies. Pwsh is awesome but the syntax gives me AIDS. But the wordiness makes it easy to remember commands because it reads as a sentence.
Anonymous No.106187489
>>106187252
>object oriented scripting
Anonymous No.106187727
>>106186251
>lunix users
That's not what your link talks about though. The OP wants to do that only using POSIX tools, and the first answers tells him there are more sensible ways to do it on Linux.