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

Switch to approved verbs & add aliases #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

God-damnit-all
Copy link

Originally I was proposing #9; then I remembered the unapproved verb warnings I've been suppressing from PowerShell 7.

The functions have been renamed using the approved verb Invoke, and with their previous function name added as an alias. Additionally, each function has a 2nd alias that is much shorter, for faster use.

Function Renamed to... 2nd alias
Foreach-ObjectFast Invoke-PSOneForeach ForEachObj
Where-ObjectFast Invoke-PSOneWhere WhereObj
Group-ObjectFast Invoke-PSOneGroup GroupObj

@God-damnit-all
Copy link
Author

Because I changed PSOneTools.psd1 to UTF-8 so that GitHub would stop interpreting it as a binary file (it was UTF-16 LE before) it caused a merge conflict with #7, so I went ahead and incorporated it. Just a minor release note fix.

@God-damnit-all
Copy link
Author

Today I learned that aliases are allowed to have symbols in them. Maybe F% and F? for the fast foreach and fast where would be good additions?

Also, a brief tangent not necessarily related to this PR: you can even start aliases with two forward slashes, which would be an interesting way to add very short aliases in a cross-platform compatible way.

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

Successfully merging this pull request may close these issues.

1 participant