-
Notifications
You must be signed in to change notification settings - Fork 499
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
Remove redundant snippets #2062
Remove redundant snippets #2062
Conversation
Decision to remove 'Cmdlet' instead of 'Function-Advanced' is because a function defined in PowerShell with the 'CmdletBinding' attribute is technically an advanced function rather than a cmdlet, which would be defined in C# with the 'Cmdlet' attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The primary reason this snippet exists is for ISE users moving to VSCode i.e. this snippet is a close approximation to the cmdlet
snippet in ISE. Now, whether we want to continue to provide these "bridges" to ISE users is a question for the PS team. Just wanted to chime in with "why" this particular snippet exists.
Aha. In that case, either a more descriptive name or a source-code comment would be better. |
@travis-c-lagrone this is in two snippets because of an earlier limitation imposed by vscode , now you can update the prefix to an array to get this functionality |
I did not know that! I might see about adding that to the VS Code documentation as well when I get the time. (it does not appear to be documented at the moment) |
'cmdlet' is an ISE compatibility snippet prefix, but is identical to (and is more accurately described as) the 'function-advanced' snippet.
This is a parallel change to @58646792cd87565b9688c6123d79049abc859ddc, because--strictly speaking--comment-based help does not apply to a cmdlet but rather to an advanced function.
FYI, I plan on submitting another PR soon to have the folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for updating this!
Remove the following snippets (listed by name, not prefix):
Cmdlet
The removed-redundant-snippet to kept-redundantee-snippet mappings are as follows (listed by name, not prefix):
Cmdlet
:Function-Advanced
The decision to remove
Cmdlet
instead ofFunction-Advanced
is because a function defined in PowerShell with theCmdletBinding
attribute is technically an advanced function rather than a cmdlet, which would be defined in C# with theCmdlet
attribute.However, the
cmdlet
prefix has also been added to theFunction-Advanced
snippet (whose other prefix isfunction-advanced
), becausecmdlet
is an ISE snippet prefix for an advanced function and so should be preserved for compatibility.