Shellcheck Support

Source Directive

source "$(dirname "${BASH_SOURCE[0]}")/../"

BashSupport Pro supports Shellcheck’s source directive. This directive is useful for filenames, which are not static. ../ is a static value, but "$(dirname "${BASH_SOURCE[0]}")/../" is not. Shellcheck and BashSupport Pro only understand static values.

If you use a dynamic value in script, then you can use the shellcheck source directive to define the static location:

# shellcheck source=../
source "$(dirname "${BASH_SOURCE[0]}")/../"

BashSupport Pro assumes that the source path is relative to the current file. By default, Shellcheck uses the directory where it’s executed as root for source paths. Use the source-path directive or execute shellcheck -P ... if this is a problem in your setup.

Go to Declaration
You can navigate to the source files by ctrlclick or by using the NavigateGo to Declaration action.
The source= path is updated when you rename the referenced file. It’s also updated when you move the file, which contains the source directive.