Your message dated Fri, 3 Jul 2020 15:05:57 -0500
with message-id <[email protected]>
and subject line vi-mode yank-last-arg rings bell has been fixed
has caused the Debian Bug report #601042,
regarding bash: yank-last-arg in VI_COMMAND_MODE wrongly rings bell
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
601042: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=601042
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash
Version: 4.1-3
Severity: normal
X-Mailer: reportbug 4.12.6
For years I have done command line editing (set editing-mode vi) using
ESC_ to recall the last argument to the previous command typed. When I
have done this over the last year or so, it beeps in addition to doing
the substitution. (Currently seeing this behavior in bash 3.2 and 4.1)
A beep normally means that something is amiss such as trying to find something
that is not there, but in this case, there is nothing wrong; the last argument
gets correctly yanked and is appended to the command line. The beep is
annoying and misleading.
The problem appears to be in file: text.c after line 312. The code is:
312 point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count,
MB_FIND_NONZERO);
313
314#if defined (VI_MODE)
315 if (point >= rl_end && VI_COMMAND_MODE())
316 point = _rl_find_prev_mbchar (rl_line_buffer, rl_end, MB_FIND_NONZERO);
317#endif
318
319 if (rl_point == point)
320 rl_ding ();
321
322 rl_point = point;
If it is in VI_COMMAND_MODE, it modifies point to be the same as rl_point,
tests it, rings the bell, and then sets rl_point = point, which it already was
modified to be. Commenting out lines 315 and 316 eliminate the problem, but
they must have been introduced to solve some other problem.
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages bash depends on:
ii base-files 5.9 Debian base system miscellaneous f
ii dash 0.5.5.1-6 POSIX-compliant shell
ii debianutils 3.4 Miscellaneous utilities specific t
ii libc6 2.11.2-6 Embedded GNU C Library: Shared lib
ii libncurses5 5.7+20100313-4 shared libraries for terminal hand
Versions of packages bash recommends:
ii bash-completion 1:1.2-2 programmable completion for the ba
Versions of packages bash suggests:
pn bash-doc <none> (no description available)
-- Configuration Files:
/etc/bash.bashrc changed [not included]
-- no debconf information
--- End Message ---
--- Begin Message ---
I believe this bug has been resolved. I'm unable to reproduce it on
bash 4.4 or 5.0 and see the following entry in the bash CHANGES for
bash-4.2-alpha.
l. Fixed a bug that caused vi-mode yank-last-arg to ring the bell
when invoked at the end of the line.
--
David Fries <[email protected]>
--- End Message ---