Powershell是否有一个不错的命令行解析器? [英] Is there a decent command line parser for powershell?
问题描述
我习惯了NDesk.Options,我发现它既简单又强大。但是在尝试在Powershell中对其进行编码之前,我想知道是否已经内置了某些东西。
I am used to NDesk.Options, which I find both simple and powerful. But before trying to code against it in powershell I am wondering whether there is something already built in.
谢谢
推荐答案
不确定要理解您的问题,但就解析脚本或函数参数而言,您已经将 param
键盘作为请在 about_Parameters , about_Functions_Advanced , about_Functions_Advanced_Parameters 。这样您就可以为参数指定不同的限制。
Not sure to understand your question but as far as you want to parse script or function parameters you've got the param
keywork as discribe in about_Parameters, about_Functions_Advanced, about_Functions_Advanced_Parameters. This will allow you to specify different restriction for parameters.
这篇关于Powershell是否有一个不错的命令行解析器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!