Remove-Item Alias:cat
Remove-Item Alias:cp
Remove-Item Alias:curl
Remove-Item Alias:echo
Remove-Item Alias:ls
Remove-Item Alias:man
Remove-Item Alias:mv
Remove-Item Alias:pwd
Remove-Item Alias:rm
Remove-Item Alias:wget Remove-Item Alias:cat
Remove-Item Alias:cp
Remove-Item Alias:curl
Remove-Item Alias:echo
Remove-Item Alias:ls
Remove-Item Alias:man
Remove-Item Alias:mv
Remove-Item Alias:pwd
Remove-Item Alias:rm
Remove-Item Alias:wgetLKML gets hundreds of messages every day. When I used to read it I had a set of search filters to prioritize it. Anything I didn't get to I simply marked Read. There's no way to catch everything on there.
Maybe get it passed through by someone who is in Linus's email filters.
Although it's been a year and you probably don't care anymore. :)
Although I'd still consider curl/wget to be specific tools and not generic commands, so emulating them seems a bit weird.
https://news.ycombinator.com/item?id=12319670
Edit: the RFC intended to address the curl author's issue was rejected.
https://github.com/PowerShell/PowerShell-RFC/blob/master/X-R...
For those, it's also possible to evade the aliasing just by explicitly appending the .exe onto the command. 'pwd.exe' gets you the GNU version.
For example, a .jpg image can be marked as executable, but it is not an executable. This can happen on both Linux and Windows, and I believe it is handled by the filesystem. I supposed the term "marked as executable" could be used for this, while "is executable" could mean the OS will grant it a PID using the correct system call, but this is uncommon.
On Linux, you can attempt to execute any file using a system call like execve(). Similarly, on Windows you can also attempt to run a JPEG using CreateProcess(). I know the Windows shell probably won't run a JPEG even if it is marked executable(there are a collection of Registry entries that map file extensions to programs that run them, for the shell), but I don't know if the CreateProcess() API function rejects files without the correct extension.
If both CreateProcess() and GetBinaryType() fail to detect a PE file with the incorrect extension, then you can reasonably say that Windows uses the extension to determine whether a file is an executable(though not whether it is executable). The behavior of the shell isn't sufficient.
I used this feature when I worked on a VR app written in Unity, and I had a little launcher program that checked for updates and then started the main program. I didn't want people to bypass the launcher, so I renamed the main program to have a .VR extension instead of .exe, preventing it from being run directly from File Explorer. The launcher had a .exe extension and could be run normally, and then it used CreateProcess to run the FooBar.VR executable.
alias some-command='some-command.sh --arg'
and then running "some-command" versus "some-command.sh". (The Window's shell does interpret stuff with the ".exe" suffix differently, just it's not the key factor here.)Not to mention user experience. Adding these aliases made moving back-and-forth between nix and Windows much less jarring for me. They also really helped drive home the difference between something like bash and posh because investigating the differences between the aliases and their nix namesakes revealed their respective strengths and weaknesses.
I imagine changing aliases would be out of the question since they should have priority over PATH but perhaps a special conditional case for these the first time they're run interactively would be to check for the nix equivalent in your PATH and prompt to see if you'd like to remove them.
If you have a lot of experience with something like bash and you can run circles with it PowerShell probably doesn't add a lot of short term value.
So imagine when they packaged that for Mac, that assumption is no longer true.
A new "bottom of the stack" alias instead of the current one that takes precedent over executables.
Granted, don't use aliases in scripts and all that.