|
FlapYoJacks posted:Or --help Do you think PowerShell doesn't have the equivalent of man pages? Where are you going with this bit? Ranzear posted:"It's word-salad enough for us to pre-alias everything and normalize the practice" is not the glowing recommendation you think it is, and then it's only aliasing the basic command and still requires whatever technovomit single-dashed-only garbage they came up with for arguments. Yes, it does exactly what I'd expect. And I'm 99% certain (on vacation and can't check), but if yoi just tab-complete -h it will spell out the full flag which makes it obvious. Y'all picking a weird hill to die on, here.
|
# ? Apr 2, 2023 07:09 |
|
|
# ? Jun 8, 2024 07:06 |
|
Imagine defending Powershell syntax lmfao.
|
# ? Apr 2, 2023 07:11 |
|
I don't think Powershell has chosen the best names for a lot of its commands, but I'll take it versus the previous scripting situation on Windows. I don't see MS changing course, so we are stuck with verb-noun for the foreseeable future unless you want to call dotNET directly.
|
# ? Apr 2, 2023 07:11 |
|
Do you guys really just type random words into cli and expect them to be valid commands? At least for me, the discoverability of any command is completely independent of it’s name - I just google for vague terms of what I’m trying to do and hope that something turns up. Also, while linux has an great set of command line utilities, bash scripting syntax is absolute garbage.
|
# ? Apr 2, 2023 07:25 |
|
EoRaptor posted:I don't think Powershell has chosen the best names for a lot of its commands, but I'll take it versus the previous scripting situation on Windows. I don't see MS changing course, so we are stuck with verb-noun for the foreseeable future unless you want to call dotNET directly. My scripting solution for windows has been "you have python installed, right?" for over a decade
|
# ? Apr 2, 2023 07:29 |
|
more falafel please posted:My scripting solution for windows has been "you have python installed, right?" for over a decade 2 or 3 though?
|
# ? Apr 2, 2023 07:35 |
|
powershell is endless terrible decisions around one core and good idea - pass structured data instead of text around
|
# ? Apr 2, 2023 08:26 |
|
Obviously the solution is to get into obscure alternative shells like Nushell.
|
# ? Apr 2, 2023 08:56 |
|
FlapYoJacks posted:Imagine defending Powershell syntax lmfao. I just can't understand the process that takes someone from "the super-terse *nix builtins are not very easy to lear" to whatever in the actual gently caress is going on with powershell. ... It's cocaine, isn't it?
|
# ? Apr 2, 2023 09:10 |
|
I didn't think that it was controversial anywhere to point out that Powershell has some badly named commands and syntax that's somehow even worse than bash, which is an impressive feat when you consider the age of said syntaxes. Should have known that the Coding Horrors thread would teach me otherwise
|
# ? Apr 2, 2023 09:16 |
|
PowerShell has enough faults that it seems like some real smoothbrain poo poo to invent more of them and then to post about how not mad you are when it gets pointed out you just made some poo poo up.
|
# ? Apr 2, 2023 09:25 |
|
Making poo poo up, as opposed to what you're doing right now lol
|
# ? Apr 2, 2023 09:28 |
|
What matters is that everyone agrees that Powershell is poo poo and should go in the trash, but only after whatever the gently caress is still going on in cmd
|
# ? Apr 2, 2023 09:30 |
|
FlapYoJacks posted:Imagine defending Powershell syntax lmfao. Imagine defending unix cli syntax lomarf grep -h is another fun one, although without any other arguments it just does the same as plain grep so you do get a usage summary
|
# ? Apr 2, 2023 09:34 |
|
QuarkJets posted:Making poo poo up, as opposed to what you're doing right now lol You're the one who told us you just type random commands into you Unix prompt and hope they do something non-catastrophic. Which just lmao if that's the case.
|
# ? Apr 2, 2023 09:51 |
|
QuarkJets posted:What matters is that everyone agrees that Powershell is poo poo and should go in the trash, but only after whatever the gently caress is still going on in cmd yeah, "just pass human readable strings between programs" is a clear winner in the marketplace of ideas
|
# ? Apr 2, 2023 10:41 |
|
This is how we end up with Haskell shells like turtle. "The shell script lays on its back, its commands baking in the hot sun, beating its monads, trying to fork itself over but it can't, not without for the correct types. But you don't have the correct types." ynohtna fucked around with this message at 11:09 on Apr 2, 2023 |
# ? Apr 2, 2023 11:07 |
|
I know the core unix stuff well enough and use bash for githooks and such but I love that I can pick up any random powershell script at work and figure it out pretty easily, including when it uses first or third party powershell modules. Object piping is amazing and i've replaced some stupidly ugly, long, and fragile bash scripts with far more readable and succinct powershell scripts in the past. The way everything follows conventions is nice too; verbs are consistent and have meaning, pretty much all commands support a common set of parameters (-WhatIf, -ErrorAction, -Confirm, -Debug), . IMO, the actual lovely things about powershell are: 1. It's Microsoft so it's rarely going to get much buy-in outside of Windows environments, and usually for good reason. The only reason I have a lot of experience with it is we use Windows and Octopus deploy at work; I don't even run Windows at home now. 2. Slow as hell. They need to figure out how to cache shell profiles in some way so they load quickly or something, idk. 3. Verb-noun instead of noun-verb. I'll take this convention over no convention at all but it's still frustrating. 4. The operators are so annoying. Let me write > instead -gt and == insteda of -eq. 5. copy on write variable scoping is a bit of a footgun but you could argue "holding it wrong" about this one I guess.
|
# ? Apr 2, 2023 12:53 |
|
QuarkJets posted:syntax that's somehow even worse than bash
|
# ? Apr 2, 2023 13:32 |
Toshimo posted:Do you think PowerShell doesn't have the equivalent of man pages? PowerShell doesn't have the equivalent of man pages. What it has is better than man pages. The commands exist as objects that can be be inspected and carry documentation and you can query all sorts of things about the valid syntaxes and data types. Also, creating documentation for your own commands and modules is dead easy, and makes it available in the same consistent form as that for all built-in modules. pre:PS C:\Windows\system32> help Set-NetAdapterLso -Parameter NoRestart -NoRestart [<SwitchParameter>] Indicates that the cmdlet does not restart the network adapter after completing the operation. Many advanced properties require restarting the network adapter before the new settings take effect. Required? false Position? named Default value Accept pipeline input? false Accept wildcard characters? false Yes, it's verbose. But I'm also not a hunt-and-pecker on my keyboard, and I don't think this extra typing is going to make my key switches break.
|
|
# ? Apr 2, 2023 14:04 |
|
Whose bash mans is this
|
# ? Apr 2, 2023 14:05 |
|
more falafel please posted:My scripting solution for windows has been "you have python installed, right?" for over a decade Then you do where python in a script, get 0 so you try to call it and then your user gets super weird error, because some extreme brain genius in MS decided to bundle python executable that redirects to the loving MS store. Toshimo posted:Do you think PowerShell doesn't have the equivalent of man pages? This guy gets it: redleader posted:powershell is endless terrible decisions around one core and good idea - pass structured data instead of text around Just the fact that returning empty array behaves differently from array with single element which behaves differently from array with multiple elements should tell you that PS is fundamentally broken.
|
# ? Apr 2, 2023 14:10 |
|
I love the Windows Store python setup, I can send our field support python scripts without spending a ton of time helping them gently caress around with paths and installers.
|
# ? Apr 2, 2023 14:19 |
|
Soricidus posted:Imagine defending unix cli syntax lomarf Imagine four computers on the edge of a cliff...
|
# ? Apr 2, 2023 15:48 |
|
Remulak posted:I love the Windows Store python setup, I can send our field support python scripts without spending a ton of time helping them gently caress around with paths and installers. The Bash vs Powershell fight is funny to me because they're both incomprehensible garbage as far as I'm concerned. I've had to write bash scripts on occasion for like 20+ years and I still have to consult a reference to figure out how to do basic control flow constructs.
|
# ? Apr 2, 2023 16:04 |
|
CPColin posted:Imagine four computers on the edge of a cliff... Can I push them all off, or just the one?
|
# ? Apr 2, 2023 16:28 |
|
Better push all of them, just in case
|
# ? Apr 2, 2023 16:45 |
|
Bongo Bill posted:Obviously the solution is to get into obscure alternative shells like Nushell. tbh, with 24k stars, someone’s using this poo poo and is excited about it. I’m not about to write any long lived scripts in it but I’ll try it out.
|
# ? Apr 2, 2023 17:42 |
|
Toshimo posted:You're the one who told us you just type random commands into you Unix prompt and hope they do something non-catastrophic. Which just lmao if that's the case. You're literally proving my point, as that's not what I or anyone else said. "Making poo poo up" indeed lmao
|
# ? Apr 2, 2023 18:14 |
|
CPColin posted:Imagine four computers on the edge of a cliff... The Zyborne Shell (better known as zsh)
|
# ? Apr 2, 2023 19:24 |
|
Toshimo posted:You're the one who told us you just type random commands into you Unix prompt and hope they do something non-catastrophic. Which just lmao if that's the case. are you aware of tab completion? there's a difference between "mash my keyboard randomly and hope something good happens" vs "type the first 3 letters of some niche rarely-used command I half-remember and then let my terminal list out the completion possibilities"
|
# ? Apr 2, 2023 20:38 |
|
RPATDO_LAMD posted:are you aware of tab completion? there's a difference between "mash my keyboard randomly and hope something good happens" vs "type the first 3 letters of some niche rarely-used command I half-remember and then let my terminal list out the completion possibilities" Of course I'm aware, but I'm not the one trying to advance the argument that unix as a monolith is full of human-readable commands by way of comparison. Find is more the exception than the rule because no newbie is ever going to sus out grep of awk or finger. Like, Get-ChildItem does what it says on the tin and help pages in PowerShell are searchable. Acting like there's this Herculean barrier to entry is laughable. If you can figure out AIX but get stumped on PowerShell, I don't know what to tell you.
|
# ? Apr 2, 2023 21:19 |
|
Toshimo posted:Of course I'm aware, but I'm not the one trying to advance the argument that unix as a monolith is full of human-readable commands by way of comparison. Not a single post itt has said that, unix has tons of bizarre commands and I haven't seen anyone argue otherwise
|
# ? Apr 2, 2023 21:35 |
|
Toshimo posted:Of course I'm aware, but I'm not the one trying to advance the argument that unix as a monolith is full of human-readable commands by way of comparison. Find is more the exception than the rule because no newbie is ever going to sus out grep of awk or finger. Settle down Beavis. Maybe it’s not worth your energy getting upset about PowerShell.
|
# ? Apr 2, 2023 21:59 |
|
nielsm posted:PowerShell doesn't have the equivalent of man pages. What it has is better than man pages. The commands exist as objects that can be be inspected and carry documentation and you can query all sorts of things about the valid syntaxes and data types. Also, creating documentation for your own commands and modules is dead easy, and makes it available in the same consistent form as that for all built-in modules. this is cool, and I had no idea PS does this what breaks the deal for me, is simply I don't know how to use it, I already I know bash, so I don't know why I would have to give the oportunity to the new thing. would the new thing make ImageMagick easier to use?
|
# ? Apr 2, 2023 23:35 |
|
Tei posted:this is cool, and I had no idea PS does this Did learn this recently, but the reason I asked about (and was never directly answered) Get-ChildItem -h had more to do with how to dig into what what some particular argument does and the follow up was gonna be along the lines of 'now show me in that help page how the gently caress I show hidden files and non-hidden files?' and what a clusterfuck it turns into, because for some reason there is no composition of multiple arguments and here's the help page on -Force: pre:PS C:\Users\Ranzear> help dir -Parameter force -Force Required? false Position? Named Accept pipeline input? false Parameter set name (All) Aliases None Dynamic? false But then that poster was and continues to be a shithead about it so I didn't care anymore. *Edit: I'll take that back, "-Attribute !hidden, hidden" does work, and looking back it's obvious why "!hidden+hidden" didn't. Ranzear fucked around with this message at 00:53 on Apr 3, 2023 |
# ? Apr 3, 2023 00:31 |
|
Ranzear posted:Did learn this recently, but the reason I asked about (and was never directly answered) Get-ChildItem -h had more to do with how to dig into what what some particular argument does and the follow up was gonna be along the lines of 'now show me in that help page how the gently caress I show hidden files and non-hidden files?' and what a clusterfuck it turns into, because for some reason there is no composition of multiple arguments You're missing the Help files. As an admin, run "Update-Help". And telling me you were trying to bait me so you could slam down a "Well, actually..." isn't really helping, especially since it turns out that it does what you want in the first place, you just had a bad syntax. Now, if you've got the help and it doesn't seem that useful in this case, that's probably true because it passes the buck to the Provider and that's pretty useless on its own (but, necessarily true because Get-ChildItem is so broad and the different Provides behave completely independently). I don't know if this was a change, because SS64, my usual go-to for PS documentation, had this to say, which is much more useful: -force Get all items including hidden or system files, but will not override security/file permissions. You can also get hidden files and folders with -Hidden or with the Hidden value of the -Attributes parameter. I don't have a historical record, but I bet that's what the docs used to say before they switched it to "See your Provider". As you can see from the last couple of pages, I have little patience for the bleating of "It different, it bad", so yes, I wasn't all that interested in getting baited by you. If you want to have a good faith discussion, just ask me the things you want to ask me in the first place. I'm much more reasonable when the conversation isn't immediately and needlessly hostile.
|
# ? Apr 3, 2023 01:44 |
|
Please don't go full d&d brain cmon now. Nobody's having a """"bad faith discussion"""" when you're doing windows vs linux for the 9999999th time who cares.
|
# ? Apr 3, 2023 03:40 |
|
Toshimo posted:idk what you are crying about. Toshimo posted:I'm much more reasonable when the conversation isn't immediately and needlessly hostile. I get that we're on the oldschool rough-and-tumble dead gay forum but, dude, it's just you. Maybe cool it a bit? Blowing up inane arguments into perceived personal attacks is my shtick and even I'm sick of it. My actual problem is barely remembered from months ago with permissions in my cargo build folders and that whole tangential string of 'how the gently caress do I even' was long solved by just mass fixing/deleting garbage in explorer and not trusting powershell or linux subsystem to run git. Hell I barely trust it to symlink assets into the test builds anymore. I'm pretty sure that all related back to the whole 'Powershell can only do elevated privileges on the entire session' horror that also belongs in this thread.
|
# ? Apr 3, 2023 04:41 |
|
|
# ? Jun 8, 2024 07:06 |
|
PS is pretty sick once you pay the pretty hefty up front costs of learning and engaging with it. The same could be said to a point with bash I guess, but the upper limit of bash ends up being limited somewhat by some architectural flaws. The fact that PS actually lets you deal with objects instead of strings is probably the killer feature tbh.
|
# ? Apr 3, 2023 07:42 |