Re:Hush, a modern shell scripting language
by majkinetor on Tuesday April 26, 2022 @08:54AM
(#31166861)
> Any good text editor (e.g. vscode does it) should be able to translate aliases into long form commands.
It can be done with script Expand-Alias[1] that can be used even as CI/CD action so people don't have to think about this.
I prefer to look into longer code in its aliased form..... mhm... we definitely need Unexpanding...
[1]: https://github.com/WormieCorp/Wormies-AU-Helpers/blob/develo...
As for the verbosity, this isn't a good argument. In my mind there are two "modes" of powershell:
* Day to day shell use, which should definitely use aliases. Nobody wants to type Get-ChildItem to get the list of files in a folder ten times in a row.
* Script writing, which should use the long form of commands. Any good text editor (e.g. vscode does it) should be able to translate aliases into long form commands.
I think they really hit the sweet spot when considering these two aspects. Long scripts are readable without referring to manpages all the time, while day to day shell is quick and easy.