`dotnet complete` behaves with `Contains` instead of `StartWith`
See original GitHub issueAfter following @timheuer’s instructions on how to set it up for my Powershell profile, I typed dotnet a→
and it displayed the following.
After upgrading from Preview 5 to Preview 7, the behavior still hasn’t changed. After reverse-engineering the script, I tried to reproduce the problem and it didn’t seem like anything could make it work.
Running dotnet --version
:
5.0.100-preview.7.20366.6
Running dotnet --list-sdks
:
3.1.100 [C:\Program Files\dotnet\sdk]
3.1.201 [C:\Program Files\dotnet\sdk]
3.1.400-preview-015151 [C:\Program Files\dotnet\sdk]
5.0.100-preview.7.20366.6 [C:\Program Files\dotnet\sdk]
I’m ready to jump onto a call if needed to retrieve the necessary bits and help the engineers understand why this is happening.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Contains is faster than StartsWith?
StartsWith and Contains behave completely different when it comes to culture-sensitive issues. In particular, StartsWith returning true does NOT ...
Read more >String.StartsWith Method (System)
This method performs a comparison using the specified casing and culture. Applies to .NET 8 and other versions. Product, Versions .NET, Core 2.0 ......
Read more >Cross-platform targeting for .NET libraries
APIs can behave differently. ... DO start with including a netstandard2.0 target. ... NET target frameworks rather than for just one.
Read more >Code quality rules overview - .NET
This rule measures class coupling by counting the number of unique type references that a type or method contains. CA1507: Use nameof in...
Read more >Best practices for writing unit tests - .NET
Learn best practices for writing unit tests that drive code quality and resilience for .NET Core and .NET Standard projects.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is indented to complete with contains. We’ve removed the dotnet migrate already. @sfoslund looks like it is a bug in completion. Could you help look into it?
Updating this issue. The behavior was that “add” should have been first and it wasn’t at the time.
It seems the code as since been updated to prioritize commands/parameters that starts with the chain of characters provided.
I consider this fixed and working.