public static String showCommandHistory(boolean direction) {

        String cmd = "";

        if (!lastCommands.isEmpty()) {
            cmd = lastCommands.pop().toString();
        }

        return cmd.trim();
    }