Bash Snip
A Bash Code Snippets Extension.
Usage
- Install the extension in VS Code
- Create a new
.sh file
- Type the snippet prefix (e.g.,
shebang, fori) and press Tab or Enter to expand
Features
| Snippet |
Description |
#!/usr/bin/env |
Shebang template with script description |
scriptdir |
Get the directory of the currently running script |
function |
Define a function in Bash |
case |
Case statement for pattern matching |
fori |
C-style for loop iterating N times |
forarray |
For loop over array elements |
readlinefile |
Read a file line by line |
readlinecommand |
Read command output line by line |
readlinevariable |
Read a variable content line by line |
License
This project is open source, licensed under the MIT License.
| |