Skip to content

recognize standard shell configuration filenames #3427

@mcandre

Description

@mcandre

ShellCheck keeps insisting on adding shebangs to .zshenv, .zshrc, and so on, which is redundant.

Can we please introduce a hashmap of file path patterns to interpreters, so that ShellCheck learns this basic information?

  • *.sh lacking an interpreter - assume POSIX sh, but generate a warning about lack of a shell specific interpreter and set exit code nonzero
  • [*.]profile - POSIX sh
  • [*.]ashrc, *.ash - ash
  • [*.]{bash_login, bash_logout, bash_profile, bashrc}, *.bash - bash
  • *.dash - dash
  • [*.]kshrc, *.ksh, - ksh
  • [*.]mkshrc, *.mksh - mksh
  • *.posh - posh
  • [*.]{zprofile, zshenv, zlogin, zlogout, zshrc}, *.zsh - zsh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions