Reading shebang in comment
chrisalcantara opened this issue · 2 comments
In my Emacs config, I have clang-format
do most of my formatting.
Adding a shebang: #!/usr/bin/c -Wall -Wextra -Werror
seems to mess with the formatter.
Perhaps it might be possible to put the shebang in a comment:
// #!/usr/bin/c -Wall -Wextra -Werror
and have c
look for it with regex: ^\/\/[\s]?#!.*?
So here's the thing, you can comment out the shebang, but then it becomes kinda useless -- you can't execute the script with ./main.c
. You could just forgo the shebang entirely and use c main.c
instead.
Although I could see it being a nice feature to detect CFLAGS (-Wall
, etc.) and execute with those.
I see. I thought the shebang was a way to pass CFLAGs. But if that's not part of the current implementation, then I understand not needing it all.