private List<CodeCompletion> getCodeCompletions(String command) {
		// extract the caret position and generate completions relative to that place
		int caretPos = command.indexOf("<caret>");
		command.replace("<caret>", "");		
		if (caretPos == -1) {
			caretPos = command.length(); 
		}

		return interpreter.getCommandCompletions(command, false, caretPos);
	}
Tests for the Ghidra Python Interpreter's code completion functionality.
Ghidra/Features/Jython/src/test.slow/java/ghidra/jython/JythonCodeCompletionTest.java