> So, my workaround is to:
> 
>     (setq comint-prompt-regexp "myname@myhost> ")
> 
> Then the filtering works perfectly.
> 
> Of course if I change my name, this will fail.  Or, more likely, connect to a
> different host within the shell.
> 
> Or if I change PS1 😉
> 
> It would be useful to automate this a little.
> 
> The variable needs to be set buffer-local to the shell buffer.
> 
> And it could possibly somehow ask the process for the value of PS1.

FWIW: the following gets at it...

(with-current-buffer "*shell*"  (setq comint-prompt-regexp   
(buffer-substring-no-properties (pos-bol) (pos-eol))))

> 
> Any more TIPS on doing this?
> 
> Or perhaps advice that I shouldn't want to ...??? 😉
> 
> Cheers,
> 
> ~ Malcolm

Reply via email to