You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tab completion: do not tab-complete filenames when binding to non-string parameters #14147
The default tab-completion (command-completion) behavior for command arguments is to complete based on the names of items in the current location (typically, files and directories present in the current file-system directory).
However, this completion is currently also performed for arguments that will bind to parameters other than untyped or [string]-typed (or perhaps also System.IO.FileInfo / System.IO.DirectoryInfo) parameters, e.g. [int], in which case such completions make no sense.
(By contrast, custom completions, validation attributes, and enum-derived types are handled correctly.)
The test should succeed.
That is, no completion should occur, because tab-completing an [int] value (without validation attributes / custom completions) makes no sense.
Actual behavior
The test fails, because completion based on the item names (files and directories) in the current directory was performed:
The last resort was always in PowerShell for non-implemented branches of the IntelliSense. So a request should be specific and positive - "to add support for IntelliSense for ... case". I suspect there are many such cases out there.
Ilya (@iSazonov): This proposal is properly framed negatively: it is about generically excluding tab-completion behavior that is self-evidently never helpful.
To put it differently: it is specific about when not to apply the fallback behavior.
The proposal is about adding an exclusion (negative) to the fallback condition/branch (positive, in a sense).
It means that when the "last resort" is reached that the fallback behavior should only be applied when it is at least potentially helpful; or, conversely, it shouldn't be applied when it is unequivocally unhelpful.
Activity
iSazonov commentedon Nov 22, 2020
The last resort was always in PowerShell for non-implemented branches of the IntelliSense. So a request should be specific and positive - "to add support for IntelliSense for ... case". I suspect there are many such cases out there.
mklement0 commentedon Nov 22, 2020
Ilya (@iSazonov): This proposal is properly framed negatively: it is about generically excluding tab-completion behavior that is self-evidently never helpful.
To put it differently: it is specific about when not to apply the fallback behavior.
iSazonov commentedon Nov 22, 2020
I believe all current branches in implementation is positive and this is more positive :-) than adding negative conditions.
mklement0 commentedon Nov 22, 2020
The proposal is about adding an exclusion (negative) to the fallback condition/branch (positive, in a sense).
It means that when the "last resort" is reached that the fallback behavior should only be applied when it is at least potentially helpful; or, conversely, it shouldn't be applied when it is unequivocally unhelpful.
microsoft-github-policy-service commentedon Nov 23, 2023
This issue has been marked as "No Activity" as there has been no activity for 6 months. It has been closed for housekeeping purposes.