emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdl


From: Ihor Radchenko
Subject: Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline
Date: Wed, 24 Apr 2024 12:52:49 +0000

Max Nikulin <manikulin@gmail.com> writes:

>> +                        shell-file-name
> ...
>> +                        (list shell-command-switch
>> +                              (concat (file-local-name script-file)  " " 
>> cmdline))))
>
> Using `shell-command-switch' unconditionally may lead to executing 
> /bin/sh instead of shell specified by `shell-file-name' for script files 
> having no shebang, see
>
> https://superuser.com/questions/502984/writing-shell-scripts-that-will-run-on-any-shell-using-multiple-shebang-lines

Good point.

> I believe, multiple arguments should be specified as '(1 a "b c").

Yes, but we do not, in general, know how to split them.

> With shebang (as header arg or as part of the body) command should be
>      /path/to/script [ARGUMENT]...
> when there is no shebang
>      /shell/executable /path/to/script [ARGUMENT]...

Maybe instead of `process-file' we can simply use `shell-command'?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]