Conversation
|
Some users have a habit of writing description of a program(using comments) before the shebang line. Any suggestions are most welcome. |
|
My English is not good, please excuse me for any mistake :-) But if there are other comments (even whitespace) before the shebang line, the shebang line just won't work, because the kernel's program loader only checks first two bytes (the "Magic number") of a file. In other words, a shebang line not in the very beginning of a file is not "shebang line" anymore. Details in http://en.wikipedia.org/wiki/Shebang_%28Unix%29. Some shell script may invoke other interpreter, and save the content (which may contain a "shebang line") to be interpreted in the same shell script as Heredoc. In this case, scanning entire buffer may cause incorrect result. Perl/Ruby's DATA section may cause the same problem, such as this script. |
|
Hi Dewdrops, |
|
All right. Though I still think shebang line should be the very first line. Thanks for this plugin and (quick) response. :-) |
|
I'll keep this issue open until I get some good fix. Thanks again. On Fri, May 9, 2014 at 4:37 PM, Dewdrops notifications@github.com wrote:
Sachin |
^means "beginning of line" in emacs lisp regexp, not "beginning of buffer". So use ``` instead.