且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

是否有 PowerShell 代码格式化程序/漂亮的打印机?

更新时间:2022-12-15 12:46:28

更新:现在在 GitHub 上:https://github.com/DTW-DanWard/PowerShell-Beautifier

UPDATE: it's now on GitHub: https://github.com/DTW-DanWard/PowerShell-Beautifier

我在 PowerShell 中编写了一个 PowerShell 漂亮的打印机/代码清理器.它清理空白、缩进代码组、用命令替换别名、修复命令、参数、类型等的大小写.您可以使用它来重新格式化文件或读取源文件并将结果输出到不同的文件中.

I wrote a PowerShell pretty printer / code cleaner in PowerShell. It cleans white space, indents code groups, replaces aliases with commands, fixes casing on commands, parameters, types, etc. You can use it to reformat a file in place or read a source file and output the result in a different file.

更多信息:http://danspowershellstuff.blogspot.com/2012/03/powershell-pretty-printer-code-cleaner.html

下载页面:http://www.dtwconsulting.com/PS/Module_PrettyPrinterV1.htm

告诉我您希望看到哪些更改/可配置/等.

Let me know what you'd like to see changed/configurable/etc.