An ArgumentCompleter script block returning no results should not result in falling back to the default tab-completion behavior #7215
Labels
Issue-Discussion
the issue may not have a clear classification yet. The issue may generate an RFC or may be reclassif
Resolution-No Activity
Issue has had no activity for 6 months or more
WG-Engine
core PowerShell engine, interpreter, and runtime
Currently, if you attach an
ArgumentCompleterAttribute
to a parameter and its script block happens to return no completions, tab completion falls back to the default behavior, i.e., completion of item names in the current location (which, in a filesystem location, cycles through the names of all files and directories in the current directory).However, it makes more sense to not complete in this event, given that the intended completions may be unrelated to provider items altogether.
Steps to reproduce
Assume that the current location is a filesystem location and that no
*.ext
files are present.Expected behavior
A no-op: given that the argument-completer script block outputs no completions, nothing should happen.
Actual behavior
Tab completion falls back to the default behavior and cycles through the names of all files and subdirectories in the current dir.
Environment data
Written as of:
The text was updated successfully, but these errors were encountered: