logoalt Hacker News

ocdtrekkieyesterday at 6:08 PM1 replyview on HN

The best part is the reason it conflicts with a lot of PowerShell is PowerShell shimmed Linux commands over to their Windows equivalents for years even though the flags were different.

So ls in many systems will match the behavior of dir, and only accept the flags for dir. But if you use a system with the newer coreutils release here, ls will expect ls flags!


Replies

zanecodesyesterday at 7:08 PM

Not that it detracts from your point, but PowerShell defined Linux-like aliases for PowerShell commands, not the old CMD.exe binaries.

So ls would actually match the behavior and accept the flags for Get-ChildItem, not dir.