Max Nikulin <maniku...@gmail.com> writes: > However looking wider, I do not like that :cmdline for ob-shell has > different meaning than for other languages, see e.g. ob-sql. Only for > shell this parameter is treated as arguments of a *script*. In other > cases :cmdline is used to specify arguments of *interpreter* and I think > ob-shell should follow this convention.
Alas, we already have the current state of affairs documented in https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html#orge70bc7b So, no breaking changes. And shell scripts are not like SQL queries - they often do need to check arguments. So, the current behaviour is justified, IMHO. For some languages, only switches to the interpreter make sense (ditaa, lilypond, plantuml). For others, (bash, python, C++, etc), we may want to pass switches to the script itself more often. What might be done is introducing _two_ different header arguments - one for interpreter switches, and another for script/program switches. Say, :interpreter-cmdline and :script-cmdline. Then, we can call the current :cmdline behaviour "dwim" and allow users to be more explicit if necessary. -- 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>