BUG: no #! line in shell scripts created for menu commands

Andrew V. Samoilov andrew at email.zp.ua
Mon Dec 22 12:06:28 UTC 2003


> I have lines like
> 
> p       add the files to playd (TEMP)
> 	playd put_end prepend %s
> 
> in my menu file. Now I noticed I get a "cannot execute binary file"
> error message when the file name contains non-ASCII characters. Looking
> at the temporary file named in the error message, I saw that the #! line
> was missing. And really, adding a #!/bin/sh line worked:
> 
> p       add the files to playd (TEMP)
> 	#!/bin/sh
> 	playd put_end prepend %s
> 
> So what I first thought was that I misread the documentation. But even the
> examples don't contain the shebang line. So I see two possible ways to fix
> this bug:
> 
> a) document it and correct the examples
> b) add a "correct" shebang line (#!$SHELL? #!/bin/sh? User-defined setting?)
>    in these temporary files

Patch attached.

-- 
Regards,
Andrew V. Samoilov.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: user.c.diff
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20031222/1109cc16/attachment.diff>


More information about the mc-devel mailing list