Spyke
TheChefSLCreply
lemmy.sdf.org

Yes, yes you can.

Also, WSL and windows terminal go a very long way in making windows actually usable...

60
Zeth0sreply
lemmy.world

"Usable" is a strong statement... It went from a "misery inducing insufferable machine" to a "extremely big annoyance". I do concede it is anyway a progress

54

You damn spoiled kids with your blue jeans and your rock and roll music and your auto complete!

2
DJArbzreply
lemmy.notmy.cloud

Package manager with a UI? I like my apt and dnf thank you very much.

16
Kangiereply
lemmy.srcfiles.zip

The UI is just there for ... automation

Wut?

I've never gone to a UI when I want to automate something, a sane CLI is much more predictable and consistent.

12

Winget-UI specifically can run the upgrade tool automatically for you, that's what I meant for "automation". You could also add a scheduler to run Winget by itself every day if you need to.

4

I've just been using scoop for many years and I haven't felt the need to switch

4

I really want to love the "everything is an object" of power shell but I just have zero uses for using a shell on windows. Granted, my windows usage is like 15 minutes a week most of the time, but still. I also can't be bothered to use it for work because it's exclusively Linux/linux-ish over there so it's not worth bothering.

Either way, I like the idea, can't really justify figuring out the details.

6

If you only have to use it 15 minutes every week it's probably not worth getting to know.

I work in a Windows shop, so I love everything being an object, most of the time. At least for the things that are worked out completely.

It's great for things you need to iterate or just for figuring out what you can do by piping a result to get-member. If you are interested in getting better at powershell at some point, I highly recommend Powershell in a month of lunches. (Also because I like Manning's model where they automatically offer the digital versions of books they sell, and also offering free previews of the entire book, given enough time)

4
______reply
lemm.ee

"But PS is open source ! Don't you want to use it in Linux and MacOS?" - Microsoft probably

2
lemmy.dbzer0.com

It's a wonderful tool for me in a Windows environment/shop, especially with how it works well with all the Windows and Microsoft administration systems/tools we use.

Personally, I'm less interested in any language's hypothetical merits than how it fits as a tool for what I need to accomplish and ease of future maintenance when the script/program/automation inevitably needs to be adjusted.

All that said, I can't think of a legitimate reason to use PSCore on non-Windows hardware unless you're just really familiar with PS and literally nothing else. Even then you're better off taking time learning a better tool for that environment.

1

That's a very good point. My angle is as a dev and not as IT or sys admin. Power shell is probably far more powerful in those circles.

2
ox0rreply
jlai.lu

Yeah but tbh i really despise powershells syntax. But i'm happy it is pretty powerful.

23

i’m often amazed at microsoft’s ability to take a useful product and make it agonizing to use

36
______reply
lemm.ee

Unfortunately, bash syntax isnt amazing either

20
______reply
lemm.ee

Yeah. I've said this before and got grilled for it but I wish there was a shell scripting language that doesn't have arcane syntax.

6

Perl, no wait you said without arcane syntax....

1
______reply
lemm.ee

I hope I didn't come across as defending ps. PS sucks and whoever decided to have functions use capital case with dashes in between needs to have their brain scanned

6
lemmy.dbzer0.com

I do a lot of work in PS and I don't find it that bad. But you forgot what's even dumber about their function naming conventions.

Function names are supposed to be a single word verb, then the dash, then the rest. But not any verb, you're supposed to use one from PS's list of acceptable ones which has some really weird omissions. And they break their own single word verb convention with "acceptable verbs" ConvertTo and ConvertFrom (ConvertTo-SecureString, ConvertFrom-Json), which are the only exception to one word verbs before the dash.

Function names are definitely one of my biggest peeves with it.

Additionally, their basic comparison operators are dumb as hell. How is "-le" better or clearer in meaning that "<="? -ne instead of !=, but == isn't just -e, it's -eq. And you can't slap an n in front of other comparators for not, -nle isn't a thing. You gotta wrap the whole comparison in parentheses and slap an ! on the front or slap -not in front. But don't try to do !-le, because that's also not a thing. It's not terrible but I refuse to believe that -eq is more readable than ==

3

Functionally speaking, PS is a really good shell language. Its minor things about it that I dont enjoy. As you said, it feels like the language design has some poor decisions.

2
Halafaxreply
kbin.social

If you can suppress 30 years of " -al" from following his buddy.

13
elvithreply
feddit.de

Isn't it md and mkdir is just an alias in Powershell to accommodate Linux users?

2

Every command that isn't fully expanded PowerShell commands is an alias. dir and ls are both aliases for Get-ChildItem.

13

Yeah posh has lot of aliases by default to make it more "friendly". mkdir is just new-item -type directory or whatever.

Also curl is just alias for invoke-webrequest and works nothing like curl

3
Nintendoreply
lemmy.world

what did you say? say that again to my face, I dare you.

55
lugalreply
sopuli.xyz

Achso, schade, aber kann man nichts machen

5
sopuli.xyz

use powershell (specifically the core version!!!), or even better something like Nu shell

38
feddit.de

Because Wine makes it possible ;)

Nah, mine was a joke on how Microsoft published Powershell on Linux and somehow thought that anyone was gonna use it.

5

Add ls.bat in your windows directory with dir as the source. It basically acts as an alias.

34
jasondjreply
ttrpg.network

Still won’t help me when I type ifconfig or dig, though.

Also I’ve noticed there is also a curl in Windows CLI that I believe is based on libcurl, but when called from powershell is an alias for (iirc) Invoke-WebRequest.

23

ifconfig doesn't even work in a lot of Linux distros anymore.

17
jvisickreply
programming.dev

I came across this one just yesterday and while it was convenient at first, I immediately got frustrated when I went to add some parameters and discovered it wasn’t actually curl

6
feddit.de

Classic PoweShell experience. Try rm -rf - I wonder why they added the aliases in the first place. Only frustrating to type different arguments which are also more verbose. Tastes like the good ol' embrace-extend-extinguish.

6
lemmy.world

echo @dir %1 %2 %3>%windir%\system32\ls.bat

Something like that should fix the problem, I think...

31
hemkoreply
lemmy.dbzer0.com

Not gonna lie I love easily readable scripts. Powershell was my first, and as much pain it can be it's for sure readable even for the most novice.

Maybe that's why I love Python too, but have hard time learning sh past very basics...

Edit: oh lol that's a fork bomb, curiosity won and had to ddg what that is. Love the simplicity of that

4

Haha!

Old-school fork bomb, at least it doesn't do anything but bog the system down..

2
lemm.ee

Cmd? What century is this? Use powershell

18
lemmy.world

I’m gonna take it a step further and say to use the new Terminal app from the winapp store which lets you integrate ALL command lines into one app and it looks snazzy to boot!

Check it out mother fuckers!

11
shastaxcreply
lemm.ee

Yes I love it. It's on w11 by default

6
yum13241reply
lemm.ee

I hate it, it takes too long to start up.

1
shastaxcreply
lemm.ee

Maybe something is wrong with your pc. It takes me about 5 seconds. Or you are just very impatient.

2

5 seconds is way too long when all I need to do is run small utility in batch.

2

Agreed. Terminal is the shite. Makes working in WSL Ubuntu really rewarding.

3
lemmy.world

I've found that powershell doesn't play nice with many command line developer tools so cmd it is.

4
lemmy.ca

Yeah powershell is better 95% of the time. But that other 5% of the time you have to go back to CMD and redo what you were attempting. So the work done in powershell is a waste of time 5% of the time, and you still will need to know CMD to be able make everything work.

So Powershell is better in theory, but in actual practice I tend to do things in CMD because I know it will work.

0

I really like PowerShell's object-oriented approach to pipelines. Unix pipes feel really dated in comparison.

3

You can just press Win key and type whatever to search and enter to open. WIN Term Enter, and there's your Windows Terminal.

2
ADTJreply
feddit.uk

I think you mean the Windows Linux for Subsystem

7
reddthat.com

What year is this from? You absolutely can use ls in a windows command prompt now.

-20
captsneezereply
lemmy.one

As of Aug 26, 2023, Windows command prompt absolutely does not recognize “ls” as a command.

Powershell is a different story.

Source: I type “ls” 40 times a day into a command prompt on my up-to-date win10 PC at work.

67
mateomauireply
reddthat.com

I literally just typed it into cmd.exe on Windows 10, fully updated, and it absolutely did work. No idea why it doesn’t work for you.

edit: ???

edit: it's been traced back to this:

https://github.com/devkitPro/installer/releases

which is an emulator toolset that I didn't know existed on my system until today.

7
captsneezereply
lemmy.one

That is interesting. I just remoted into 5 different machines at the office and none of them worked with ‘ls’. If you enter ‘ls /?’, does it give you a synopsis and argument list?

1

If I do “ls /?” it returns no such file or directory, but just “ls” performs exactly as you’d expect. I haven’t installed anything to provide that function that I know of. It never occurred to me that I would have to because as far as I know it’s always worked. Until today I just assumed it had become a standard command and never investigated. Was just happy I could use the same command in cmd and on my Pi box.

1
icesentryreply
lemmy.ca

Out of curiosity what do you do to frequently end up with cmd? I don't think I've touched it in many years at this point.

2

Lately I’ve been using it as a simple way to drag and drop a source .tar.xz archive on a .bat file so it can be twice extracted, moved, renamed, have dependencies downloaded by git, run a cmake process, do a visual studio compile, then move the result release directory back to where the .bat file is while removing unneeded files and adding new ones.

cmd and batch still has its uses.

2

It’s my own fault, and the result of 30+ years of muscle memory building up. Plus, while I agree cmd isn’t nearly as powerful as powershell or wsl can be, when I’m in Windows it’s still the fastest way for me to do 90% of the simple things I need to do. I have a long history with it, and a thorough understanding of it, so I don’t really need to think for most of the things I’m doing there.

If I need to script something, or do anything that seems like it would be annoying to do in CMD, I hop into WSL pretty quickly and get to work with bash or python. The problem I have now is that I’ve developed a little muscle memory there as well… hence my issue with entering ‘ls’ everywhere.

1
brbreply
sh.itjust.works

I can't remember doing anything and "ls" works for me

-3
lemmy.world

Probably using Powershell, or you added it. Ls definitely doesn't work in windows 10 or 11 in cmd.

8
lemmy.world

Bone stock windows 11. Like I have everyone else has said, you have done something to add it to cmd. It isn't, and has never been in cmd.

EDIT:

Try this. in CMD type in

where LS

2

Ok, getting past the dickish, completely unhelpful first part of your reply (as you can see in the comments, not EVERYONE was saying that), the second part helped me trace it back to this:

https://github.com/devkitPro/installer/releases

which is a toolset that I never intentionally installed, and was evidently added by an emulator package without me knowing where it was or what it did.

So thank you for (eventually) helping me find what it was, and now you and others know how to add it to cmd and don't have to complain about its absence.

1
brbreply
sh.itjust.works

No it works in cmd. I didn't add it intentionally atleast. Never even tried to use it till now.

1
lemmy.world

The year is 2023, if you're still using CMD or batch files still that's on you. It's like riding a horse down a freeway and yelling at cars.

-6
lemmy.world

Sometimes you just need a quick ipconfig or nslookup, or a simple scheduled shutdown /s /f /t 00

6
lemmy.world

Yeah, but it's muscle memory at this point

Win+r

Cmd

Ipconfig

Gonna take some time to get my hands to type wt instead of cmd

1

That wasn’t the conversation.

'Cmd' is to 'horse and buggy' as 'powershell' is to 'automotive vehicle'

Have no idea where you decided to pull this 100mph idea from. It wasn't a comment about speed, it was a comment about utilizing modern practices and tools. And that the joke falls apart because it's forcing the narrative all windows has is cmd and blatantly ignoring pwsh. It be me like making a joke how linux can't do wifi... because there was a time Windows did wifi just fine but linux required using a special process using an ndiswrapper with windows drivers to get linux on wifi... so like 16-17 years ago. See, hilarious.

0

That is a fair statement, but also a different topic.

I am thankful to live in an age with WSL.

2
lemmy.world

What? Ignoring the out of date, over used, 'gottem', phrase... it literally doesn't make sense given the context. I'm advocating for modern tools... how is that a 'boomer' move?

1

I ended it with a question mark because I was uncertain but otherwise your asinine, dismissive statement sounds like something a jackass who’s been around too long would say because he’s entirely too full of himself. I’m willing to recognize that it’s actually ignorance formed out of youth. Don’t think about it too hard.

1

Yes in Windows Server since, IIRC, 2012". No in Windows client versions.

I'm so used to Server commands I sometimes am surprised when commands like logoff don't work.

1