public String[] completeName(String part) {
        Vector<String> ret = new Vector<String>();
        if (part.startsWith("_")) {
            ret = CodeCompletionUtils.complete(abbrs, part);
        } else if (part.endsWith("(")) {
            ret = CodeCompletionUtils.complete(part, interpreter, commands, ext_commands);
        } else if (part.contains(".")) {
            ret = CodeCompletionUtils.complete(part, interpreter);
        } else {
            for (String temp : commands.keySet())
                if (temp.startsWith(part))
                    ret.add(temp);
            for (String temp : ext_commands.keySet())
                if (temp.startsWith(part))
                    ret.add(temp);
        }

        String[] res = new String[ret.size()];
        for (int i = 0; i < ret.size(); i++)
            res[i] = ret.get(i);
        return res;
    }