Table of Contents

Shell Scripts layer

Table of ContentsClose

fish.png

1 Description

This simple layer adds support for shell scripting.

Supported scripting files:

Note: For Windows scripting see the layer windows-scripts

1.1 Features:

2 Install

To use this configuration layer, add it to your ~/.spacemacs. You will need to add shell-scripts to the existing dotspacemacs-configuration-layers list in this file.

2.1 Linting

In order to enable sh scripts linting, install shellcheck.

2.2 Style checking

In order to enable sh scripts style checking, install bashate.

3 Key bindings

Key binding Description
SPC m \ insert end-of-line backslashes to the lines in the region
SPC i ! insert shebang in a script file
SPC m i ! insert shebang in a script file
SPC m i c insert switch case statement if supported by shell
SPC m i i insert if statement if supported by shell
SPC m i f insert function definition if supported by shell
SPC m i o insert for loop if supported by shell
SPC m i e insert an indexed for loop if supported by shell
SPC m i w insert while loop if supported by shell
SPC m i r insert repeat loop if supported by shell
SPC m i s insert select loop if supported by shell
SPC m i u insert until loop if supported by shell
SPC m i g insert a getopts while loop if supported by shell

Author: Travis CI User

Created: 2019-01-22 Tue 20:42

Validate