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

insert-last-word makes space disappear



Here's a problem I've seen for a long time, but never gotten around
to reporting. It seems like a bug to me, but perhaps I have something
configured incorrectly.

I use the new completion system with <TAB> bound to menu-complete, on zsh
4.2.0.

What happens is that the combination of menu-complete and insert-last-word
(bound to alt-.) sometimes makes a vital space disappear on the command
line. I'll give an example:

% ls last.avi
last.avi
% mpl<TAB>

zsh now completes 'mpl' to 'mplayer ', which leaves me with the command
line:

% mplayer 

with a space after 'mplayer'.

Now, if I hit alt-. (insert-last-word), this is the result:

% mplayerlast.avi

The space that was after 'mplayer' has been eaten!

It seems to me that this only happens when the menu-complete has something
unambiguous to complete, i.e. when 'mplayer' is the only completion of
'mpl'. If there had been more than one alternative, the space would not
have been added after 'mplayer', and the problem wouldn't have manifested
itself.

Is this a bug?

TIA,

Jesper



Messages sorted by: Reverse Date, Date, Thread, Author