Command line tool vs. PS cmdlets

Aug 31, 2010 at 12:15 PM

Just wondering how people feel about naming standards. Right no for example on nu we have:

nu install packagename

In the PS script this would be equivalent to:

Install-Package packagename

Do we maintain consistency between PS and say a command line tool so the console app would be:

nupack.exe Install-Package packagename

or

nupack.exe install packagename

While the first one is more verbose, it does lend itself to familiarity in that if you know or have used the PS cmdlets you know all the options on the command line (and vice-versa). The downside is that it's more to type (I'm all about minimalism). Of course the user should be able to just type nupack.exe and get a list of commands they can use but I thought one less thing to learn if you learn one interface, you learn them all.

Thoughts?

Aug 31, 2010 at 1:02 PM

aliases. :D

In PowerShell, the first thing I'm going to do is make an alias of Add-PackageReference to something to the effect of addpackage.

 

Aug 31, 2010 at 2:25 PM

Ahh, that will work. So let's keep the aliases short then and in line with the same commands on the command line client.

Which sort of begs the question. I realized the This-That syntax has been accepted as a standard for powershell scripts but really why? If we just renamed Add-PackageReference or List-Packages then we wouldn't need to have alias'

Aug 31, 2010 at 2:38 PM
I think that we are living in the PS world we should ship with something that is PS'esy ?
we can also ship with a list of known aliases

not that big of a deal and we continue to play nice with the PS

-d

On Tue, Aug 31, 2010 at 9:25 AM, bsimser <notifications@codeplex.com> wrote:

From: bsimser

Ahh, that will work. So let's keep the aliases short then and in line with the same commands on the command line client.

Which sort of begs the question. I realized the This-That syntax has been accepted as a standard for powershell scripts but really why? If we just renamed Add-PackageReference or List-Packages then we wouldn't need to have alias'

Read the full discussion online.

To add a post to this discussion, reply to this email (nupack@discussions.codeplex.com)

To start a new discussion for this project, email nupack@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Aug 31, 2010 at 2:47 PM

Sure, we can do both. Makes for more text in the blog posts and since we get paid by the word... (jk)

Developer
Aug 31, 2010 at 2:53 PM

We should stick to the powershell guidelines (verb)-(noun) for nupack.ps1. For the command line tool we can do whatever we want. Btw I pushed the code last night.

Aug 31, 2010 at 2:56 PM

Yes, but we could also define shorter aliases (but not short enough that they get conflicting with random other things).  Then whatever shorter aliases we pick would match the cmd line.