Skip to content

Commit 0e8fcf3

Browse files
authored
Merge pull request #799 from DarkDaskin/option-name-binding
Bind options by name
2 parents dbfbcc8 + 75c41fa commit 0e8fcf3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/System.CommandLine/Binding/Binder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal static bool IsMatch(this string parameterName, string alias) =>
1515
StringComparison.OrdinalIgnoreCase);
1616

1717
internal static bool IsMatch(this string parameterName, ISymbol symbol) =>
18-
symbol.Aliases.Any(parameterName.IsMatch);
18+
parameterName.IsMatch(symbol.Name) || symbol.Aliases.Any(parameterName.IsMatch);
1919

2020
internal static bool IsNullable(this Type t)
2121
{

0 commit comments

Comments
 (0)