Bash should not print ^C when pressing ctrl-c to abort reverse history search
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bash (Debian) |
New
|
Unknown
|
|||
bash (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Binary package hint: bash
When doing a regex history search by pressing ctrl+R and then typing some text, you often want to abort the search. If you do that with ctrl-C, in order not to accidentally run the command, then the shell prints a ^C inside the command, overwriting whatever was at that position before. This behavior also happens, when you interrupt any running command on the shell, thus signaling that the end of output is not the end as actually printed by the program.
So, in the first case it's a bug (or at least annoying), in the second it might be regarded a feature.
Steps to reproduce:
1. Open Shell
2. Press ctrl-R, type "ls"
3. Press ctrl-C
It's also visible if you run "sleep 10" and press ctrl-C or if you just press ctrl-C when on an idle prompt.
I've tested it with the xfce4-terminal and xterm, and in each with bash, dash and sh. Someone in IRC figured out, that zsh doesn't show this behavior. Someone else reported, that it happens in gentoo as well, suggesting that it might be an upstream problem.
The problem first appeared with karmic. It might be a readline issue as well.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: bash 4.1-2ubuntu2
ProcVersionSign
Uname: Linux 2.6.32-21-generic x86_64
NonfreeKernelMo
Architecture: amd64
Date: Thu Apr 22 10:52:41 2010
InstallationMedia: Xubuntu 10.04 "Lucid Lynx" - Alpha amd64 (20100415)
ProcEnviron:
PATH=(custom, user)
LANG=de_DE.utf8
SHELL=/bin/bash
SourcePackage: bash
Changed in bash (Debian): | |
status: | Unknown → New |
Workaround from Debian bug: (works fine here)
stty -echoctl