Recaf icon indicating copy to clipboard operation
Recaf copied to clipboard

CLI completion for methods?

Open werame opened this issue 3 years ago • 0 comments

I've been using the CLI version on some large project because it uses a lot less RAM than the GUI version (less than half).

But it doesn't seem to have command line completion for method names, which is quite a bummer because I have to type all the gory arguments.

Looking at the source:

	@CommandLine.Parameters(index = "0",  description = "The class containing the method",
			completionCandidates = WorkspaceNameCompletions.class)
	public String className;
	@CommandLine.Parameters(index = "1",  description = "Method definition, name and descriptor. " +
			"For example 'method()V'", completionCandidates = WorkspaceNameCompletions.class)

So it seems that it offers class names completion for method names.

If this is not a bug, then I guess it's a missing feature, i.e. the lack of method name completion.

Ah ok, there's no other completion besides class name... https://github.com/Col-E/Recaf/blob/419925d996fe33d3caa94a864070af97c1a2d625/src/main/java/me/coley/recaf/command/completion/WorkspaceNameCompletions.java

As a workaround, for now, if you know some string that exists in the method, search string CONTAINS 'something' will print the full name of the method, including parameters, under INFO.

werame avatar Feb 13 '22 19:02 werame