@Override
    public String getHistoryFileName() {
      if (generatedHistoryFileName == null) {
        String fileName =
            new File(parentDir, (getFileNamePrefix() + "-gfsh.history")).getAbsolutePath();
        generatedHistoryFileName = fileName;
        return fileName;
      } else {
        return generatedHistoryFileName;
      }
    }
HeadlessGfshConfig for tests. Taken from TestableGfsh
geode-dunit/src/main/java/org/apache/geode/management/internal/cli/HeadlessGfsh.java