Live Templates

BashSupport provides live templates for your shell scripts. Please refer to JetBrains’ documentation about live templates to learn how to use this feature of your IDE.


The following live templates are available in a command context.

caseCase statement
cmdCommand substitution
cmd_success_checkCmd success check
curlHTTP request
dir_bashDirectory of the source script (Bash)
dir_posixDirectory of the source script (POSIX)
findFind file or directory
forFor loop in list
foriArithmetic for loop
functionDefine a function
ifif statement
selectSelect expression
tar_compresstar compress
untilUntil loop by condition
whileWhile loop by condition


The following live templates are available in contexts where arrays can be used.

array_addAdd new item to the end of array
array_allAll array elements
array_at_indexElements at index
array_createCreate array
array_deleteDelete array
array_delete_atDelete from array
array_iterationIterate through array
array_lengthArray length
array_set_elementArray set element at index


The following live templates are available in bats-core files.

@testbats-core test
setupExecuted before each bats-core @test
setup_fileExecuted before the first setup() of a file
teardownExecuted after each bats-core @test
teardown_fileExecuted after the last teardown() of a file
© 2020–2024 Joachim Ansorg
Privacy Policy