You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the formatter in VS Code to manage my Bash startup files.
The Bash IDE language server recognizes that they are written in a supported language.
For my scripts, they require a shebang, and the Bash IDE extension kicks in again...
But the vs-shell-format extension seems to insist on the sh suffix to make the formatter available...
Can we provide an option to explicitly list file names where the formatter should be available? The typical startup file names should just be recognized by default...
Or is there another way to force access to this formatter in VS Code?
The text was updated successfully, but these errors were encountered:
Perhaps it could look at shebang line to see if it's a shell script? The shell script formatting command shfmt has a -f option to recursively scan for shell scripts. This command uses the regex:
A lot of my scripts are sourced (and hence don't have a shebang line).
The shebang line of course is ignored as a comment when sourcing a file, but I don't like to use a shebang line, because it implies that the script can be executed...
Another problem with the shebang, is that the extension now has to consider every file that gets opened, checking for a shebang line...
So as a first compromise, I would like to see support for files like:
I'm using the formatter in VS Code to manage my Bash startup files.
The
Bash IDE
language server recognizes that they are written in a supported language.For my scripts, they require a shebang, and the
Bash IDE
extension kicks in again...But the vs-shell-format extension seems to insist on the
sh
suffix to make the formatter available...Can we provide an option to explicitly list file names where the formatter should be available? The typical startup file names should just be recognized by default...
Or is there another way to force access to this formatter in VS Code?
The text was updated successfully, but these errors were encountered: