@Override
	public List<CodeCompletion> getCompletions(String cmd, int caretPos) {
		// Refresh the environment
		interactiveScript.setSourceFile(new ResourceFile(new File("jython")));
		interactiveScript.set(
			new GhidraState(tool, tool.getProject(), currentProgram, currentLocation,
				currentSelection, currentHighlight),
			new ScriptControls(console, interactiveTaskMonitor));

		return interpreter.getCommandCompletions(cmd, includeBuiltins, caretPos);
	}
Returns a list of possible command completion values at the given position.

@param cmd current command line (without prompt)
@param caretPos The position of the caret in the input string 'cmd'
@return A list of possible command completion values. Could be empty if there aren't any.
Ghidra/Features/Jython/src/main/java/ghidra/jython/JythonPlugin.java