josa42 / coc-sh

SH language server extension using bash-language-server for coc.nvim.
MIT License
209 stars 4 forks source link

Never use #!/bin/bash #58

Closed poetaman closed 2 years ago

poetaman commented 2 years ago

On latest macOS 12.1, the #!/bin/bash is arcane! Look at this:

>>/bin/bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.

Instead use: #!/usr/bin/env bash. That will pickup the default bash which in my case is:

>> bash --version
GNU bash, version 5.1.16(1)-release (aarch64-apple-darwin21.1.0)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Not changing would bring weird bugs your way from macOS users.

josa42 commented 2 years ago

Not sure what you are proposing...?