ShellStartupOptions (@NotNull ShellStartupOptions baseOptions) { String workingDir = getWorkingDirectory(baseOptions.getWorkingDirectory()); Map<String, String> envs = getTerminalEnvironment(workingDir); List<String> initialCommand = doGetInitialCommand(baseOptions, envs); ShellTerminalWidget widget = getShellTerminalWidget(baseOptions); if (widget != null) { widget.setShellCommand(initialCommand); } ShellStartupOptions updatedOptions = baseOptions.builder() .shellCommand(initialCommand) .workingDirectory(workingDir) .envVariables(envs) .build(); if (enableShellIntegration()) { updatedOptions = injectShellIntegration(updatedOptions); } return applyTerminalCustomizers(updatedOptions); }