Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Bash SnipNew to Visual Studio Code? Get it now.
Bash Snip

Bash Snip

Keith Chu

| (0) | Free
A Bash Code Snippets Extension.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Bash Snip

A Bash Code Snippets Extension.

Usage

  1. Install the extension in VS Code
  2. Create a new .sh file
  3. 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.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft