zsh-users
 help / color / mirror / code / Atom feed
From: Raghavendra Prabhu <raghu.prabhu13@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Issue with histreduceblanks
Date: Thu, 26 Sep 2013 00:52:35 +0530	[thread overview]
Message-ID: <CAEtq3tNjNumBv2BZMS0FXUL9-pRWDtGZJ1pZ1NKPw3rxtOFunA@mail.gmail.com> (raw)
In-Reply-To: <20130918211227.51cdbd0f@pws-pc.ntlworld.com>

On Thu, Sep 19, 2013 at 1:42 AM, Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
> On Thu, 19 Sep 2013 00:20:58 +0530
> Raghavendra D Prabhu <raghu.prabhu13@gmail.com> wrote:
>> I have been noticing an issue with mangling of history (randomly) from a few
>> weeks, today I decided to check which option may have been
>> causing that. It seems to be histreduceblanks
>>...
>> I got this thread - http://www.zsh.org/mla/workers/1997/msg00542.html
>> from search, but it looks like it turned out to be an issue with
>> terminal capabilities.
>>...
>> I use rxvt-unicode normally and noticed the issue on that first.
>> However, as you can see above, I can reproduce this with xterm as
>> well.
>
> It's probably worth making sure whether this is a shell issue or a
> terminal issue.
>
> Recall the line, then (regardless of it being mangled) go to the
> start of it and enter "print ", then hit return.  If it's a terminal
> issue the line you see will be correct.  It seems a bit unlikely that
> that's the problem if it's associated with the option, though.
>
> Are there any non-ASCII characters on the line that might be confusing
> the algorithm (the option pre-dates handling of multibyte characters)?
>
> --
> Peter Stephenson <p.w.stephenson@ntlworld.com>
> Web page now at http://homepage.ntlworld.com/p.w.stephenson/

Hi


Sorry for the delay in replying (it had ended in my Junk due to
Precedence headers).

a) I had also noticed that it writes to the history file mangled.

==================================================
zsh -f
Archie% setopt appendhistory sharehistory histreduceblanks
Archie% HISTFILE=/tmp/.zsh_history
Archie% HISTSIZE=5000
Archie% SAVEHIST=5000
Archie% cat /tmp/.zsh_history
setopt appendhistory
HISTFILE=/tmp/.zsh_history
HISTSIZE=5000
SAVEHIST=5000
true
cat /tmp/.zsh_history
setopt rcs
setopt sharehistory
true
cat /tmp/.zsh_history
: 1380136272:0;setopt appendhistory sharehistory histreduceblanks
: 1380136276:0;HISTFILE=/tmp/.zsh_history
: 1380136279:0;HISTSIZE=5000
: 1380136282:0;SAVEHIST=5000
: 1380136285:0;cat /tmp/.zsh_history
Archie% Only two kinds of witnesses exist.  The first live in a
neighborhood where
zsh: command not found: Only
Archie% Only two kinds of witnesses exist. he  fisst lvee in a
neighorrhood werre
Archie% cat /tmp/.zsh_history
setopt appendhistory
HISTFILE=/tmp/.zsh_history
HISTSIZE=5000
SAVEHIST=5000
true
cat /tmp/.zsh_history
setopt rcs
setopt sharehistory
true
cat /tmp/.zsh_history
: 1380136272:0;setopt appendhistory sharehistory histreduceblanks
: 1380136276:0;HISTFILE=/tmp/.zsh_history
: 1380136279:0;HISTSIZE=5000
: 1380136282:0;SAVEHIST=5000
: 1380136285:0;cat /tmp/.zsh_history
: 1380136298:0;Only two kinds of witnesses exist. he  fisst lvee in a
neighorrhood werre
: 1380136309:0;cat /tmp/.zsh_history



b)  Also tested with print as requested

============================================
zsh -f
Archie% setopt histreduceblanks
Archie% Only two kinds of witnesses exist.  The first live in a
neighborhood where
zsh: command not found: Only
Archie% Only two kinds of witnesses exist. he  fisst lvee in a
neighorrhood werre
Archie% print Only two kinds of witnesses exist. he  fisst lvee in a
neighorrhood werre
Only two kinds of witnesses exist. he fisst lvee in a neighorrhood werre
Archie%
==================================================


So, is no one else facing this? In that case I wonder if this is an
issue with libraries - glibc etc.


pacman -Q zsh glibc
zsh 5.0.2-4
glibc 2.18-5


  parent reply	other threads:[~2013-09-25 19:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18 18:50 Raghavendra D Prabhu
2013-09-18 20:12 ` Peter Stephenson
2013-09-18 21:32   ` Bart Schaefer
2013-09-25 19:22   ` Raghavendra Prabhu [this message]
2013-09-26 17:12     ` Bart Schaefer
2013-09-26 17:47       ` Raghavendra Prabhu
2013-09-26 21:03         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEtq3tNjNumBv2BZMS0FXUL9-pRWDtGZJ1pZ1NKPw3rxtOFunA@mail.gmail.com \
    --to=raghu.prabhu13@gmail.com \
    --cc=p.w.stephenson@ntlworld.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).