Shell scripts support also includes a special type of run/debug configuration.
Make sure the Shell Script bundled plugin is enabled. If the plugin is disabled, activate it as described in Plugins.
To enhance shell scripts support, CLion integrates with the following external tools:
ShellCheck is a shell script static analysis tool that can detect syntax errors, semantic problems, corner cases, and typical pitfalls. CLion will prompt you to install it if it is not available.
Configure files recognized as shell scripts
By default, CLion recognizes files with the following extensions as shell scripts: .sh, .bash, .zsh. However, you can configure CLion to recognize any file types as shell script files (for example, if you want to edit .csh files).
Run shell script files
When working on a shell script file, you can click in the gutter to run it in the built-in Terminal. This creates the Shell Script run/debug configuration (if it doesn't already exist for this file) and launches it. To create the Shell Script run/debug configuration manually for any arbitrary file, do the following:
From the main menu, select.
Click and select Shell Script.
Specify the path to the script file and options that you want to pass to the script when it is launched. You can also change the interpreter for running the script and additional options for the interpreter. If necessary, add tasks that you want to automatically launch before running this script file.
Click OK to save the run/debug configuration.
You can also run the shell script from the context menu: right-click the file in the Project tool window or anywhere in the editor tab of the shell script file.