Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Remaining zsh3.0-pre2 bugs
- X-seq: zsh-workers 1547
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Huy Le <huyle@xxxxxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Remaining zsh3.0-pre2 bugs
- Date: Sat, 6 Jul 1996 22:53:13 -0700
- In-reply-to: Huy Le <huyle@xxxxxxxxxxxxxxxxxxxxx>        "Remaining zsh3.0-pre2 bugs" (Jul  6,  3:59pm)
- References: <199607062259.PAA11588@xxxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
On Jul 6,  3:59pm, Huy Le wrote:
} Subject: Remaining zsh3.0-pre2 bugs
}
} 1. History bug:
} The magic-space binding seems to mess up the history of
} a line with a quoted argument that spawns two lines.
This is not a magic-space bug, specifically.  It happens any time
doexpandhist() is called on the second or later line of a command
that spans multiple lines.
} pride% echo 'a
} > b' c
} a
} b c
} pride% history
}     1  bindkey ' ' magic-space
}     2  history
}     3   c
}     4  history
But you can get the same thing with:
zsh[83] echo 'a
> b' c<TAB><RET>	<-- `c' menu-completes to `co'
a
b co
zsh[84] history -2
   82  history
   83   co
   84  history -2
Here's an even worse case; the command vanishes entirely:
zsh[85] echo 'a
> b'<TAB><RET>		<-- TAB moves cursor to beginning of line, then RET
a
b
zsh[85] history -4	<-- Note event number in prompt hasn't changed!
   81   c
   82  history
   83   co
   84  history -2
   85  history -4
I think the problem is with the "if (!err)" block near the end of
doexpandhist(), because it has a comment about resetting the cursor
to the beginning of line for vi mode.  However, I don't know enough
about how history works to want to mess with it.
-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern
New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author