Matt <m...@excalamus.com> writes: > Changing the `ob-shell-async-chunk-callback' like this will fix it: > > @@ -276,7 +276,7 @@ See `org-babel-comint-async-indicator'.") > (defun ob-shell-async-chunk-callback (string) > "Filter applied to results before insertion. > See `org-babel-comint-async-chunk-callback'." > - (replace-regexp-in-string comint-prompt-regexp "" string)) > + (replace-regexp-in-string (concat (regexp-quote org-babel-sh-prompt) " *") > "" string))
This is trying to replicate what `org-babel-comint-with-output' does already and is stumbling upon the same edge cases. May you instead factor out the filtering code from `org-babel-comint-with-output' and reuse it in ob-shell? -- 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>