emacs-devel
[Top][All Lists]
Advanced

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

Re: comint-output-filter-functions and multi-line input


From: Ihor Radchenko
Subject: Re: comint-output-filter-functions and multi-line input
Date: Fri, 21 Oct 2022 05:35:30 +0000

Rudolf Adamkovič <salutis@me.com> writes:

> After investigating, I found that ...
>
> #### (with-current-buffer "*bash*"
> ####   (let ((comint-process-echoes t))
> ####     (dolist (line (list "if true"
> ####                         "then"
> ####                         "echo hello"
> ####                         "fi"))
> ####       (insert line)
> ####       (comint-send-input))))
>
> ... outputs (perhaps the desired) ...
>
> $ if true
>> then
>> echo hello
>> fi
> hello
>
> Would this help?

Not always. It may depend on terminal settings. In particular, on the
PS1, PS2, and PROMPT_COMMAND values.

I ended up getting rid of the whole line-by-line loop.

-- 
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]