Run Configuration Settings

Configuration

Most of the following fields support macros. The little plus-sign on the right guides you which macros are available for a particular property.

Here’s JetBrains help page about run configurations: Run/debug configurations.

Source
Defines the script to execute. You can choose between File and Inline Snippet .
  • File: The file path to the script, which should be executed. Learn more
  • Inline Snippet: Store a snippet inside of the run configuration without creating a new shell script on disk. This is usually useful for small utilities or scripts to automate things in your workflow. Learn more
Script arguments
This allows you to pass arguments to the script. This is supported for both file and inline snippet sources. Wrap an argument with double-quotes if it contains spaces, e.g. "first argument" second.
Working directory
This allows you to customize the working directory of your script. The default value is displayed if there’s no custom value set.
Environment variables
This allows you to customize the environment of your script. You can add items in the form key=value. By default, the parent environment is passed. Use the little icon on the right to customize this behaviour.
Interpreter
This allows you to customize the interpreter, which is used to execute your script. The default interpreters are configured in your application settings at FileSettingsLanguages & FrameworksBashSupport Pro .
Default interpreter for script
The type of your script defines, which default interpreter is used. The POSIX interpreter is used for.sh files and the Bash interpreter is used for .bash files, for example.
Default Bash interpreter
The first interpreter with type Bash is picked from the list of configured interpreters.
Default POSIX interpreter
The first interpreter with type POSIX is picked from the list of configured interpreters.
Default zsh interpreter
The first interpreter with type Zsh is picked from the list of configured interpreters.
Chosen by your OS
On Linux and macOS files can be made executable. With this setting your operating system will pick the interpreter for you, if there’s one. This is useful to avoid side–effects by your own interpreter settings. You could also use this to run regular executables, which are not shell scripts.
Custom interpreter path
Finally, this allows you to set your own interpreter for just this run configuration. Please note that this might cause compatibility issues if you share such run configurations with members of your team.
Windows path mapping
This property allows you to define how the script path is mapped on Windows. Paths like C:\dir\file.txt are not valid UNIX paths and need to be mapped to something like /mnt/c/dir/file.txt. WSL, MSYS, and Cygwin all have different mapping strategies and this property allows to configure which mapping should be used, if the automatic detection failed to do the right thing.
Redirect input
This is stdin redirection. This allows you to choose a file, which will be send to stdin of your executed script. Please note, that ANSI escape codes will not be interpreter in your scripts output if this is defined, because stdin redirection turns of the console emulation.

Logs

This is the same log configuration, which you might have already used with other types of run configurations. The table at the top allows you to define log files, which should be opened when you execute this run configuration.

Save console output to file lets you save the content of stdout to a file on disk.

Startup/Connection

This setting is only useful for debugging, when the automatic detection of the version of your Bash interpreter failed. This should only rarely be needed. If you don’t know what to do here, set this to Automatic .

Application Settings

The application settings allow you to define a list of default shell interpreters.