有什么好的PowerShell谓词命名准则? [英] What are good guidelines for naming PowerShell verbs?

查看:88
本文介绍了有什么好的PowerShell谓词命名准则?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始学习PowerShell,我想知道Posh中是否有针对cmdlet(或高级功能,无论在CTP3中称为什么的高级功能)动词.

I'm early on in my PowerShell learning, and I'm wondering if there are some good guidelines for verbs in Posh for cmdlets (or advanced functions, whatever they're called in CTP3).

如果我做一个动词,我会看到很多.但是我仍然不确定如何布置模块.

If I do a get-verb I can see the lot of them. But I'm still not sure how I should lay out my modules.

这是我现在遇到的示例.我有一个小脚本问Perforce:如果要同步,哪些文件将更改,它们有多大?它输出大小的摘要以及将在其中进行更改的文件夹的迷你树(以及需要解决的数量).

Here's the example I'm running into right now. I have a little script that asks Perforce: if I were to sync, what files would change and how big are they? It outputs a summary of sizes and a mini-tree of folders for where the changes will occur (as well as how many would need resolving).

这是一个查询-p4sync吗?还是"sync-p4 -whatif"?还是其他?

Is that a query-p4sync? Or is it a 'sync-p4 -whatif'? Or something else?

在我开始编写许多这些脚本之前,我想确保自己命名正确.

Before I start writing a lot of these scripts I want to make sure I name them right.

推荐答案

您可以找到

You can find a list of common verbs on MSDN along with a description what they should be used for.

这篇关于有什么好的PowerShell谓词命名准则?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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