Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `copy-earlier-word' and `smart-insert-last-word
- X-seq: zsh-users 5832
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh users list <zsh-users@xxxxxxxxxx>
- Subject: Re: `copy-earlier-word' and `smart-insert-last-word
- Date: Sun, 26 Jan 2003 05:21:54 +0000
- In-reply-to: <20030126025944.6740.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030126025944.6740.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
On Jan 25, 9:59pm, Le Wang wrote:
}
} `copy-earlier-word' works well (cycles through words on the
} same history line) with `insert-last-word', but it fails with
} `smart-insert-last-word'.
The problem is that smart-insert-last-word counts shell parser "word"
tokens, whereas insert-last-word counts ZLE words (i.e., the substrings
that forward-word and backward-word move across); copy-earlier-word
always runs `zle .insert-last-word ...', so it won't always pick the
same word as smart-insert-last-word.
(Most of the Functions/Zle widgets were designed independently of one
another, and no concerted effort has been made to make sure that they
all cooperate. The `*insert-last-word' test is just meant to cover
insert-last-word both with and without the leading dot -- it's an
accident that it also matches smart-insert-last-word.)
In order to fix this, smart-insert-last-word has to be modified to
accept the two arguments that insert-last-word accepts, and then
copy-earlier-word has to store the value of $LASTWIDGET for re-use
the same way it stores __copyword. I have no patch at this point.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author