News for hackers. Stuff that matters.
Re:Nushell.sh ls | where size > 10mb | sort-by modified by jodrellblank on Sunday March 12, 2023 @11:39PM (#35130697)
PowerShell command, their parameters, string comparison, regex matching and filenames on Windows are not case sensitive, unless you want them to be.

It really gets you that you need to know aliases to keep it short? So why aren't you writing:

    du --summarize --human-readable | sort --human-numeric-sort --reverse | sed --expression='10q'

`-exec ls -lt {} +` is not good because -exec is not handled by the shell so it behaves differently to running other commands, because `+` is a nonstandard command terminator, because {} is a nonstandard placeholder and because using `find` to run commands is an onion noboy would guess.

In your terse example, `sort -h` depends on you having run `du -h` to trigger the matching "serialise information to text" and "parse information out of text" that they both have special cased to make that one use work, because there's no separation of content and presentation (like PowerShell has) and no structured data to pass between different commands.

Not only will PowerShell tab-complete the names and the parameters, it will tab complete the properties Length and LastWriteTime because it can tell what objects come out of Get-ChildItem and what their available properties are.

> "Also, again, case-sensitive commands make me mad."

You do understand that du, find, sort, sed are case sensitive commands, and the PowerShell cmdlets aren't, right?

There are no comments on this comment yet.