Feature Request: include language keywords in command completion results
See original GitHub issueSummary of the new feature/enhancement
Include language keywords, such as ‘continue’, ‘switch’, ‘foreach’, etc… in with the command completions offered by intellisense/tab completion.
Proposed technical implementation details (optional)
I don’t yet know if its possible to restrict the keywords when the insertion point is not the first command in a pipeline, but there is already 1 case in the completion logic that has decided that foreach
should not have an ampersand &
(invoke) operator inserted before it (its actually in the completions because its an alias for ForEach-Object
) because its more likely what the user wanted, but none of the other keywords get this treatment. Including the keywords would actually eliminate this special case.
I am sure somewhere there is a complete list of keywords in the code, I’m just not sure if there is anything to use as a tooltip text readily available.
I may experiment on this while working the other bugs out of the completion code.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Thanks, @vexx32, sometimes I speak better computer than English. 😃
Aside from complexity and demand not that I know of. It’s not exactly as simple as it first seems since you have to add logic for only returning a keyword completion result when it’s actually applicable and that branch of code doesn’t exist yet. That’s pretty minor, but still