File tree 1 file changed +7
-4
lines changed
src/main/java/org/springframework/shell/core 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 30
30
import java .util .Set ;
31
31
import java .util .SortedSet ;
32
32
import java .util .TreeSet ;
33
- import java .util .logging .Level ;
34
33
import java .util .logging .Logger ;
35
34
36
35
import org .springframework .shell .core .annotation .CliAvailabilityIndicator ;
@@ -1045,7 +1044,13 @@ public void obtainHelp(
1045
1044
StringBuilder sb = new StringBuilder ();
1046
1045
1047
1046
// Figure out if there's a single command we can offer help for
1048
- final Collection <MethodTarget > matchingTargets = locateTargets (buffer , false , false );
1047
+ Collection <MethodTarget > matchingTargets = locateTargets (buffer , false , false );
1048
+ for (MethodTarget candidate : matchingTargets ) {
1049
+ if (buffer .equals (candidate .getKey ())) {
1050
+ matchingTargets = Collections .singleton (candidate );
1051
+ break ;
1052
+ }
1053
+ }
1049
1054
if (matchingTargets .size () == 1 ) {
1050
1055
// Single command help
1051
1056
MethodTarget methodTarget = matchingTargets .iterator ().next ();
@@ -1115,8 +1120,6 @@ public void obtainHelp(
1115
1120
}
1116
1121
1117
1122
LOGGER .info (sb .toString ());
1118
- // LOGGER.warning("** Type 'hint' (without the quotes) and hit ENTER for step-by-step guidance **"
1119
- // + StringUtils.LINE_SEPARATOR);
1120
1123
}
1121
1124
}
1122
1125
You can’t perform that action at this time.
0 commit comments