Code Completion

BashSupport Pro supports code completions of variables, functions, and commands.

Elements of the current file, of files sourced by the current file and of all files, which source the current file, are shown.

Variables

Variables of your current script and of sourced scripts show up in code completion. If the current file is sourced somehwere else, then variables declared in that file, show up, too.

Variable Completion in BashSupport Pro
Variable Completion in BashSupport Pro

Variable Declarations

Variables are suggested for commands, which expect variable names as arguments.

Variable Declaration Completion in BashSupport Pro
Variable Declaration Completion in BashSupport Pro

Functions

All functions, which are available at the current position, are shown in code completion. Functions, which are out of scope, are not displayed.

Variable Declaration Completion in BashSupport Pro
Variable Declaration Completion in BashSupport Pro

Commands

BashSupport Pro suggests built-in commands and commands, which are defined by the POSIX standard.

Please note, that POSIX commands are shown even when they’re not present on the current machine.

Command Name Completion in BashSupport Pro
Command Name Completion in BashSupport Pro

Shebang

Commonly used shebang commands are displayed, when you start typing in the shebang line.

shebang completion in BashSupport Pro
shebang completion in BashSupport Pro

File Paths

File paths are completed. If you’re referencing a path at the first position of a command, then the popup is shown automatically. But to avoid unnecessary automatic completions, you have to manually invoke code completion for arguments.

Please note, that this is using the paths of the current machine. Make sure, that you’re only using paths, which are also available in the target environment of your script.

Path Completion in BashSupport Pro
Path Completion in BashSupport Pro