commit 1f4f7811644bcf95b04fe0f4ba0a0d616a65ea7c
parent 7188ed770019a169fed27713bf447f3daf6b9051
Author: Kévin Le Gouguec <kevin.legouguec@gmail.com>
Date: Tue, 21 Jul 2026 14:27:00 +0200
Fix quirk with dumb-emacs-ansi
To think vibe coders need $200 subscriptions to keep their towers of
jank rising. Can kludge with the best of them, no GPU required.
Diffstat:
1 file changed, 13 insertions(+), 0 deletions(-)
diff --git a/.bash_prompt b/.bash_prompt
@@ -206,6 +206,19 @@ __dumb-term/init ()
{
PROMPT_COMMAND=__dumb-term/refresh
PS1='\W\$ '
+
+ # I configure 'M-x shell' to use TERM=dumb-emacs-ansi; empirically
+ # this makes Bash emit this bracketed paste sequence…
+ #
+ # ^[[?2004l^M^J^[[?2004h
+ #
+ # … whenever I send a command, which 'M-x shell' fails to
+ # completely scrub, leaving a spurious empty line. Possibly
+ # comint.el could learn to clean those sequences better; until
+ # then, this will do:
+ bind 'set enable-bracketed-paste off' 2>/dev/null
+ # (Silence stderr, since Bash will sometimes complain about "line
+ # editing not enabled", despite the bind command working fine).
}