Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please use an approved verb #16

Closed
oising opened this issue Sep 18, 2014 · 14 comments
Closed

Please use an approved verb #16

oising opened this issue Sep 18, 2014 · 14 comments
Assignees

Comments

@oising
Copy link

@oising oising commented Sep 18, 2014

Please consider using an approved verb so we don't have to suffer the module system's warnings. Jump is fine for an alias, but it's not just about that. The verb/noun system breaks down if we don't stay consistent. Yes, strictly speaking "jump" makes more sense to you, but those of us who are using powershell for many years prefer standard verbs and won't go looking for jump. Plus, it makes me itch in an unscratchable place in my brain when I see non-standard verbs.

Suggestions:

  • select-location
  • find-location

Thanks,

Oisin (PowerShell MVP)

@vors
Copy link
Collaborator

@vors vors commented Sep 18, 2014

Thank you Oisin!
I will replace it to 'select-location'. I hope @tkellogg doesn't have concerns about it.
He is original author, his explanation about naming https://github.com/tkellogg/Jump-Location#why-jump-location

@tkellogg
Copy link
Owner

@tkellogg tkellogg commented Sep 18, 2014

Is there a way to have both? I didn't like Select originally because this usage of "select" doesn't seem consistent with how "select" is used elsewhere in PowerShell. Or maybe I'm just being an English language Nazi... 😬

@vors
Copy link
Collaborator

@vors vors commented Sep 18, 2014

How about Enter-Location as a name for cmdlet, and Jump-Location as an alias? (but then we need to have Exit-Location .... =) )

@tkellogg
Copy link
Owner

@tkellogg tkellogg commented Sep 18, 2014

Sure, sounds great.

@oising
Copy link
Author

@oising oising commented Sep 19, 2014

Here's the thinking: Enter is specific - you're entering an exact location that you are specifying. Like enter-computer foo: you're connecting to "foo" Not a computer that sounds like foo, not a wildcard match against some random computer that might contain the string foo (because that would be impossible to do using dns.)

Select-Location means "choose from a list of possibilities." If I hold out a pack of cards and say "select a card," you are picking one from a range. With your cmdlet, the user passes a wildcard or incomplete path and it will select from a potential list of possibilities, weighted around the most used locations.

Make sense?

(Incidentally, I don't believe you must match enter/exit cmdlets. One can exist without the other.)

@lzybkr
Copy link

@lzybkr lzybkr commented Sep 19, 2014

I think the correct verb is Set.

PSCX has a Set-LocationEx that adds some cool stuff on top of Set-Location. I think Jump-Location should use another modified form of Set-Location as the function/cmdlet name and Jump-Location as an alias.

@halr9000
Copy link

@halr9000 halr9000 commented Sep 20, 2014

+1 for select

@stefanstranger
Copy link

@stefanstranger stefanstranger commented Sep 20, 2014

+1 for Select.

Cannot wait to test this together wit PSReadline module!

/Stefan

@vors vors self-assigned this Sep 22, 2014
@vors
Copy link
Collaborator

@vors vors commented Sep 22, 2014

I like @lzybkr's suggestion. It can be Set-LocationSomething. I'd like to say
Set-LocationFromVisited, but it's too verbose.
My variant is
Set-LocationJ

  1. The verb is appropriate.
  2. It follows Set-LocationEx pattern
  3. Explorable.
@oising
Copy link
Author

@oising oising commented Sep 22, 2014

@vors I don't see (Noun)Ex as a plus in any scheme. And what does "explorable" mean?

@lzybkr
Copy link

@lzybkr lzybkr commented Sep 22, 2014

I think the verb doesn't matter (much). It's not really meant for scripting, right? And then the noun really doesn't matter either.

At any rate, the argument against Select - I expect output when I use Select. I don't expect output when I use Set.

My first thought was Set-SmartLocation or something like that but my first thoughts are rarely good so I didn't bother mentioning it.

@vors
Copy link
Collaborator

@vors vors commented Sep 23, 2014

@oising by "explorable" I mean Intellisense scenario, when you type Set-Loca... and then found that you have 'Set-Location', 'Set-LocationEx' and 'Set-LocationJ'. But I changed my mind.

I'm going to use Set-JumpLocation (suggested by Lee Holmes).
For other cmdlets we use 'Jump' prefix as well (we currently have only one more cmdlet: Get-JumpStatus, but may have more in future).

I'd like to close on name, because name doesn't really mean much. The impotent part is to use approved verb, so users will not get warnings.

@oising
Copy link
Author

@oising oising commented Sep 23, 2014

Sure, I can go with Set-JumpLocation (although I despise fixed module prefixes.)

@oising oising closed this Sep 23, 2014
@vors
Copy link
Collaborator

@vors vors commented Sep 23, 2014

Please, don't close issues, until they are actually fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants
You can’t perform that action at this time.