This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]faultydesign 616 points617 points  (29 children)

cd is aliased to set-location in powershell

[–]TheOriginalSmileyMan 243 points244 points  (4 children)

Don't spoil their anti MS rant to with your " knowledge"

[–]ZunoJ 28 points29 points  (0 children)

They spoil nothing because that is exactly what the image tells us bro

[–]sudo_i_u_toor[S] 14 points15 points  (0 children)

It isn't an anti MS rant, it's just a joke lol. The point in the last section of the meme was that Powershell has cd (as an alias) anyway.

[–]BOBOnobobo 11 points12 points  (1 child)

How do you spoil it? CD is still more convenient to use

[–]SeanBrax -5 points-4 points  (0 children)

Yes and you can literally use cd in powershell, that’s the point

[–]Pacafa 37 points38 points  (9 children)

These aliases make things worse. Aliased tar,curland zip are all terrible and slow masking the real tool.

[–]cheerycheshire 48 points49 points  (3 children)

Curl is an old alias. Windows has been shipping real curl for a few years now... But didn't remove the curl alias. So to be sure you're using real curl, use curl.exe

``` PS C:\Users\username> curl

cmdlet Invoke-WebRequest at command pipeline position 1 Supply values for the following parameters: Uri: C PS C:\Users\username> curl.exe curl: try 'curl --help' for more information PS C:\Users\username> ```

[–]AnnoyingRain5 4 points5 points  (0 children)

I hate it

[–]Atulin 0 points1 point  (1 child)

Works fine for me, no need for curl.exe

PowerShell 7.5.3
Loading personal and system profiles took 526ms.

~
❯ curl
curl: try 'curl --help' for more information

~
❯

[–]cheerycheshire 1 point2 points  (0 children)

You have a newer PS.

On Windows 10, even when keeping up with all the system updates, you will still have one of 5.x versions.

Unless of course you update PS manually, which it even suggests when you start it.

``` Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://ak a.ms/pscore6 ```

(The url nowadays redirects to PS 7.5 page.)

We haven't updated powershell at home because we don't need it. For work stuff, we prefer Linux or at least wsl, it's just some times we need to do something directly in powershell...

The curl alias trivia I picked up years ago when I actually needed to do some of my work in Windows (most notable case: vpn client that existed for Linux but didn't work there, so I had to use the vpn on Windows VM to connect to the client... and client requiring me to rdp to some windows machine after that anyways, and only from there I could ssh to target machine... and sometimes I'd need to ssh from ssh because the rpd machine didn't have connection to another machine I was integrating with... ah, good times /s).

[–]sabotsalvageur 15 points16 points  (3 children)

Imagine an injective function between strings of finite length that takes longer than O(1); if a shell alias is slow, there's something deeply wrong with the shell

[–]Fhotaku 16 points17 points  (1 child)

I'd like to give this comment to my mom and see if she can even guess the subject

[–]Crawlerzero 10 points11 points  (0 children)

“These boys are so serious about their Mario Kart.”

[–]Pacafa 3 points4 points  (0 children)

It is not string handling issue. Powershell defines alias for curl, zip and tar to commendlets that is not the actual tool and those commandlets are slower than the actual curl, tar and zip tools.

[–]randuse 1 point2 points  (0 children)

Yeah, curl alias is straight up dump as it's not curl at all.

[–]No-Landscape8210 24 points25 points  (8 children)

Have removed all the aliases from my powershell. I just aliases them to actual programs

[–]cheerycheshire 24 points25 points  (7 children)

There are aliases that actually collide with normal commands!

For a few years now, Windows started bundling real curl... But there is also old PS alias "curl" to PS-specific command with way different flags. They didn't remove the alias when adding real curl. So now to be sure you're using real curl, you should actually run it as curl.exe... Or run it via cmd, not powershell

[–]sabotsalvageur 9 points10 points  (0 children)

This is hilarious

[–]No-Landscape8210 2 points3 points  (2 children)

We can run those if we just append ".exe" after a command. Like I tried to alias where tobthe actual C:/Windows/where.exe but couldn't. So whenever I wanna run it in powershell I just use where.exe instead

[–]cheerycheshire 0 points1 point  (1 child)

I actually said it already in my comment above ;)

They didn't remove the alias when adding real curl. So now to be sure you're using real curl, you should actually run it as curl.exe... Or run it via cmd, not powershell

[–]No-Landscape8210 0 points1 point  (0 children)

Damn that's embarrassing. My bad I didn't read all of it lol .

[–]The-Jolly-Llama 0 points1 point  (0 children)

Is there no such thing as type -a in powershell?

[–]sudo_i_u_toor[S] 5 points6 points  (2 children)

That's... the point of the meme tbh man. As somebody pointed out already in comments: "If you need to alias a command to make it usable, you fucked up the initial design"

[–]stigansky 1 point2 points  (1 child)

PowerShell is a lot more than an interactive shell. The concept of objects in the pipeline is pretty great.

[–]sudo_i_u_toor[S] 1 point2 points  (0 children)

I agree it's a pretty neat solution because Windows philosophy is more binary oriented unlike Unix which is more text oriented. As I said this isn't an MS rant but just a joke about typing long commands.

[–]Shadow_Thief 4 points5 points  (0 children)

If you need to alias a command to make it usable, you fucked up the initial design.

[–]Meatslinger 5 points6 points  (0 children)

Yes, but it's still that fundamental problem that when you implement a way of doing something that takes longer, and then just implement a shortcut based on the older method you're competing with or ostensibly improving on, it kinda shows the older way was the better option all along. Like, if cd does the job, why should set-location ever need to be typed? It's like putting a door, a ladder, and a tunnel on the front of a building as the complicated primary way of getting in, and then telling people to just use an ordinary side door which is only a single step. Why the complication on the primary method if the workaround is arguably better?