Re:From macOS to Windows and WSL
by yjftsjthsd-h on Friday December 07, 2018 @06:07PM
(#18632525)
> rather than help UNIX users, as was probably intended, this just confuses and annoys them.
Compatibility layers are great, when they're actually compatible. Almost-compatible layers are a nightmare.
> Compatibility layers are great, when they're actually compatible. Almost-compatible layers are a nightmare.
That's why you should not use them. You decided to use them.
I wasn't just blindly assuming the alias worked the same. I actually read the Compare-Object documentation [1], which contains that exact command as an example of how to compare files. I just didn't understand the sort of comparison it did.
If you search "PowerShell compare two files", it becomes pretty clear this is a common confusion even among people using the name Compare-Object. For example, the top serverfault question has an incorrect top-voted, accepted answer [2].
[1]: https://docs.microsoft.com/en-us/powershell/module/microsoft...
Re:From macOS to Windows and WSL
by yjftsjthsd-h on Saturday December 08, 2018 @12:32AM
(#18634079)
Well, perhaps some hypothetical "you" uses them:) To be clear, I run 100% genuine Bourne-family shells on unix-like systems, and merely visit MS-land for sightseeing;)
For reference, `Compare-Object -SyncWindow 0` would give the behavior you wanted. The default is [Int32]::MaxValue.
Aliasing UNIX command names is another one of PowerShell's mistakes in my opinion, because it creates the expectation that they work the same way when they often very much don't. Ultimately rather than help UNIX users, as was probably intended, this just confuses and annoys them.