|
@@ -221,7 +221,7 @@ public class TabCompleter {
|
221
|
221
|
} else {
|
222
|
222
|
return getIntelligentResults(context.getWindow(),
|
223
|
223
|
new CommandArguments(context.getPreviousArgs().subList(offset,
|
224
|
|
- context.getPreviousArgs().size())));
|
|
224
|
+ context.getPreviousArgs().size())), context.getPartial());
|
225
|
225
|
}
|
226
|
226
|
}
|
227
|
227
|
|
|
@@ -231,11 +231,12 @@ public class TabCompleter {
|
231
|
231
|
*
|
232
|
232
|
* @param window The input window the results are required for
|
233
|
233
|
* @param args The input arguments
|
|
234
|
+ * @param partial The partially-typed word being completed (if any)
|
234
|
235
|
* @return Additional tab targets for the text, or null if none are available
|
235
|
236
|
* @since 0.6.4
|
236
|
237
|
*/
|
237
|
238
|
private static AdditionalTabTargets getIntelligentResults(final InputWindow window,
|
238
|
|
- final CommandArguments args) {
|
|
239
|
+ final CommandArguments args, final String partial) {
|
239
|
240
|
if (!args.isCommand()) {
|
240
|
241
|
return null;
|
241
|
242
|
}
|
|
@@ -250,7 +251,7 @@ public class TabCompleter {
|
250
|
251
|
targets = ((IntelligentCommand) command.getValue())
|
251
|
252
|
.getSuggestions(args.getArguments().length,
|
252
|
253
|
new IntelligentCommandContext(window,
|
253
|
|
- Arrays.asList(args.getArguments())));
|
|
254
|
+ Arrays.asList(args.getArguments()), partial));
|
254
|
255
|
}
|
255
|
256
|
|
256
|
257
|
if (command.getValue() instanceof ChannelCommand) {
|
|
@@ -270,11 +271,12 @@ public class TabCompleter {
|
270
|
271
|
*
|
271
|
272
|
* @param window The input window the results are required for
|
272
|
273
|
* @param text The text that is being completed
|
|
274
|
+ * @param partial The partially-typed word being completed (if any)
|
273
|
275
|
* @return Additional tab targets for the text, or null if none are available
|
274
|
276
|
* @since 0.6.4
|
275
|
277
|
*/
|
276
|
278
|
public static AdditionalTabTargets getIntelligentResults(final InputWindow window,
|
277
|
|
- final String text) {
|
278
|
|
- return getIntelligentResults(window, new CommandArguments(text));
|
|
279
|
+ final String text, final String partial) {
|
|
280
|
+ return getIntelligentResults(window, new CommandArguments(text), partial);
|
279
|
281
|
}
|
280
|
282
|
}
|