DEV Community

Aubrey Portwood
Aubrey Portwood

Posted on


Need to use shellcheck with .zsh and or #!/bin/zsh scripts? [SC1071]

If, like me, you find yourself trying to use shellcheck to lint .zsh files with #!/bin/zsh but it keeps telling you:

A screenshot of the error below.

shellcheck: error
error - ShellCheck only supports sh/bash/dash/ksh scripts. 
Sorry! [SC1071]
Enter fullscreen mode Exit fullscreen mode

What I was able to do is pass the --shell=bash argument to shellcheck and then it would lint my files.

In my case this was configured in my SublimeLinter config, like so:

    "linters": {
        "shellcheck": {
            "args": [
Enter fullscreen mode Exit fullscreen mode

...just in case you are using Sublime Text!

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git