是否有 PowerShell 代码格式化程序/漂亮的打印机? [英] Is there a PowerShell code formatter / pretty printer?

查看:61
本文介绍了是否有 PowerShell 代码格式化程序/漂亮的打印机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找 PowerShell 程序的源代码美化器.理想情况下,它将基于 CLI,但任何解决方案都是可以接受的.我想避免配置通用的漂亮打印机工具;我想要一个开箱即用的解决方案,适用于 PowerShell.有这样的事情吗?

I'm looking for a source code beautifyer for PowerShell programs. Ideally, it would be CLI based, but any solution is acceptable. I would like to avoid configuring a generic pretty printer tool; I'd like a solution that works for PowerShell out of the box. Is there such a thing?

推荐答案

更新:现在在 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.

这篇关于是否有 PowerShell 代码格式化程序/漂亮的打印机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆