Re:Nushell.sh ls | where size > 10mb | sort-by modified
by Diti on Sunday March 12, 2023 @08:44PM
(#35128943)
Aliases can be redefined in certain situations (such as compiling a LCM configuration into a MOF for use with PowerShell DSC). The only safe way to script is to use the full command names (Verb-Noun).
Re:Nushell.sh ls | where size > 10mb | sort-by modified
by Arnavion on Sunday March 12, 2023 @09:15PM
(#35129302)
For scripts that you intend to be used by other people, yes. My comment was about personal scripts.
Re:Nushell.sh ls | where size > 10mb | sort-by modified
by jodrellblank on Sunday March 12, 2023 @11:09PM
(#35130480)
Command names can be shadowed, you can `function get-content { "hello world" }` and that also breaks gc alias. The only safe way to script is to use the full command names including module names `Microsoft.PowerShell.Management\Get-Content`
Re:Nushell.sh ls | where size > 10mb | sort-by modified
by yencabulator on Monday March 13, 2023 @01:02PM
(#35138672)
Frankly, you lost my interest at LCM, MOF & DSC.
https://learn.microsoft.com/en-us/powershell/scripting/whats...