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

Re: copy-prev-word question RE: Bug report interface comments



Andrej Borsenkow wrote:

> > Erm... could we, until we have some automatic forwarding from the bug
> > manager to zsh-workers, agree that full bug descriptions be sent to
> > zsh-workers, too?
> 
> bor@itsrm2% mv BI<TAB>
> bor@itsrm2% mv BIC\ NMI.rm2/
> bor@itsrm2% mv BIC\ NMI.rm2 <ESC-^_>
> bor@itsrm2% mv BIC\ NMI.rm2 NMI.rm2
> 
> I'd expect it to respect shell quouting ... note, that insert-last-word
> does that:
> 
> bor@itsrm2% mv 'xx xx' 'yy yy'
> mv: Cannot access xx xx: No such file or directory
> bor@itsrm2% mv <ESC-.>
> bor@itsrm2% mv 'yy yy'
> 
> the same with
> 
> bor@itsrm2% mv yy\ yy
> 
> the "yy\ yy" is inserted.

No patch, but I thought, I could try to explain...

insert-last-word uses the history, which contains the words for each
line, separated, parsed and everything. copy-prev-word has no such
luck, because the current line doesn't exist in parsed form yet. This
is, btw, the same reason why $historywords does not contain the words
from the current line and why `compctl -h' couldn't complete these
words.

The completion code has gat_comp_string() to get at the words from the 
current line, but setting everything up to be able to call that
function is complicated enough to kepp me from trying to fix this...

Maybe one could try it with a loop as in set_comp_sep() some day...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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