histreduceblanks can corrupt history

Bug #1334858 reported by Chaskiel Grundman
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
zsh (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

since upgrading to trusty, I have occasionally found strangely garbled commands in my zsh command history. I believe I've narrowed it down to the 'histreduceblanks' option. I'm not sure exactly what the trigger is, but the following has been a reliable repro for me (cut and paste is not strictly required, but it's where I get leading spaces from most often.

Start a new zsh -f
use a web browser to navigate to http://launchpad.net
select/copy the sentence "Learn more about Launchpad in the user guide or try it for yourself in our sandbox environment." by triple clicking.

in the zsh window,
set the histreduceblanks option
start an echo command with a trailing space, paste the text, and press return
hit the up arrow to view the previous command in history. note it's garbled.
press return, note that the actual output is wrong, not just the displayed command

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: zsh 5.0.2-3ubuntu6
ProcVersionSignature: Ubuntu 3.13.0-29.53-generic 3.13.11.2
Uname: Linux 3.13.0-29-generic x86_64
NonfreeKernelModules: openafs
ApportVersion: 2.14.1-0ubuntu3.2
Architecture: amd64
CurrentDesktop: XFCE
Date: Thu Jun 26 17:11:39 2014
SourcePackage: zsh
UpgradeStatus: Upgraded to trusty on 2014-06-16 (10 days ago)
mtime.conffile..etc.zsh.zshrc: 2013-08-02T12:59:03

Revision history for this message
Chaskiel Grundman (cg2v) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in zsh (Ubuntu):
status: New → Confirmed
Revision history for this message
andrew bezella (abezella) wrote :

fwiw zsh 5.0.5-4ubuntu1~ubuntu14.04.1 from backports does not have this bug.

Revision history for this message
Andri Möll (moll) wrote :

I believe I'm seeing the same thing on multiple machines with Zsh v5.0.2. Very particular and tends to occur relatively consistently after going up a line of history, moving around and modifying that line and executing it. Characters then get duplicated or substituted.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.