Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

ZLE suffix removal system



-----BEGIN PGP SIGNED MESSAGE-----

I have been off-net for the past week, due to moving house.  Can someone
let me know where the list archives are, or alternatively summarise
any important events since the 27th of June?  Please note the new email
address: my Warwick address will shortly disappear.

Here is a rewrite of ZLE's removable suffix mechanism.  Instead of
the old ad hoc mechanism, the new system maintains a table of suffix
lengths that should be removed for each character that might be inserted.
In zle_tricky.c, I simplified the logic considerably, removing a lot of
special cases.

There are some changes in behaviour, most noticeably for parameter
name completion.  The most complex case, with all useful options on,
looks like this:

% echo ${HOM_         press <tab>
% echo ${HOME}/_      then either:
% echo ${HOME:_       `:', or
% echo ${HOME}_       `}', or
% echo ${HOME} _      ` ', or
% echo ${HOME}/_      `/'

I have tested this extensively, and do not expect there to be any bugs
in it.  I think all parts of the new logic have been exercised.

 -zefram

begin 644 suffix_patch.gz
M'XL(")M"OC,"`W-U9F9I>%]P871C:`#M7.M;VT;6_TS_BB'M!MO(QK*QN2W-
MPZ;T;9XF:9]`VMU-LU26QJ`767(E&1<2_O<]E[E)%@G9;-I\6)9-[9'F=JZ_
M<^8,G4Y'G.3AUC\3N763R-[%FK^WM[/5'V_Y.\(?[_?[^X/QFM\;#K_H=KMW
MO;HK!L/]X=Y^?^>+3O4'OPO?W_'\P4!0`P[##6,!G[M?"`&_7T9R&J=2Q.E5
M',ZB61;)5ENTUHLR#V?S5KC(+^7U+)BGP4QZX@&]]*#=QLZ;8@OV4`9I%.21
M**_G4F1342RFT_AWD<M9=A4D/='9@A?A5T]$#R2_!3/%E>^#T;B-KPL<^O&B
MW+J,DT1,X*',:8:>$*<74K?$92&3J8@+,5_D,KD6DS@-\FL1!67@B0X,(SHB
MS4KQ_.73;BGS&3PN902#)#+%;@%^."\O1)@MTA+:ITEP7HA%(0M1PCSXHX9Y
M_/+T;R^__?;XQ5D'WDX+V'=9"-Y4)"8RR98]\8X?H$.GRO.S61"GO;"!\;O`
M^.U1G?$K[S/WX;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