Subject: Re: bug#77025: 31.0.50; Can't activate bash-ts-mode without a shebang

From: Eli Zaretskii <[email-masked]>
Date: Sat, 15 Mar 2025 12:37:32 +0200

> Date: Sat, 15 Mar 2025 06:41:10 +0000
> From:  the_wurfkreuz via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> If i try to activate bash-ts-mode in a file without a shebang, it
> falls back to using shell-mode with zsh indentation.
> 
> Steps to reproduce:
> 
> 1. emacs -Q
> 2. Clear out the scratch buffer from any text and paste this code into
> the scratch buffer:
> 
> add_service() {
>     ln -s "$service_path" /var/service/
>     echo "Service is added:"
> service_name=$(basename "$service_path")
>     ls -la /var/service/ | grep "$service_name"
> }
> 
> 3. If bash treesitter grammar isn't available, i usually install it
> through the `treesit-install-language-grammar` command with all the
> default options.
> 4. M-x bash-ts-mode
> 
> It returns this message "Indentation setup for shell type zsh", and
> instead of using bash-ts-mode it uses sh-mode.

I cannot reproduce this with today's master branch.  Your build seems
to be from an old (Jan 20) checkout of the master branch, so please
try to sync from upstream and then see if the problem persists.