question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`dotnet complete` behaves with `Contains` instead of `StartWith`

See original GitHub issue

After following @timheuer’s instructions on how to set it up for my Powershell profile, I typed dotnet a→ and it displayed the following.

image

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.

image

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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wli3commented, Jan 15, 2021

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?

0reactions
MaximRouillercommented, Nov 19, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found