Zsh Mailing List Archive
Messages sorted by:
Re: Useful query-replace zle widget
- X-seq: zsh-users 5813
- From: Philippe Troin <phil@xxxxxxxx>
- To: Felix Rosencrantz <f_rosencrantz@xxxxxxxxx>
- Subject: Re: Useful query-replace zle widget
- Date: 23 Jan 2003 17:55:41 -0800
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <20030116150917.10050.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-copies-to: nobody
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030116150917.10050.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
- Sender: Philippe Troin <phil@xxxxxxxx>
Felix Rosencrantz <f_rosencrantz@xxxxxxxxx> writes:
> Seems like it might be useful.
> Some problems I had.
> 1) Didn't handle backspace (vs. del) well, and other non-self-insert
Nope, from within query-replace, the only recognized keys are:
- backspace: erase one character
- enter: terminate string
- CTRL-C: abort
Improvements for read-within-zle are welcome.
> 2) If I was at the eol, it did nothing.
That's a feature: substitutions only happen after the current
position... Like in emacs.
> Also, a feature request for zle that will be rejected by workers...
> 3) Some sort of highlighting capability in zle, to see the selection.
Can't do anything about this, unless someone extends zle.
> --- Philippe Troin <phil@xxxxxxxx> wrote:
> > Hi,
> > I've been using these for a while and it's time for me to share
> > them... It involves `creative' use of zle... It's zsh's answer to
> > emacs's query-replace.
> > How to use:
> > 1. You need the read-within-zle function.
> > 2. Drop read-within-zle and query-replace along your fpath
> > 3. Add the following to your .zshrc:
> > autoload -zU query-replace read-within-zle
> > zle -N query-replace
> > bindkey "^[%" query-replace
> > bindkey "\M-%" query-replace # only if using bindkey -m
> > 4. Use M-x query-replace or M-% to start query-replace'ing.
> > Enclose these in the zsh distribution if you find them useful. Both
> > functions are GPL'ed but I'm willing to change the license if needed
> > for inclusion into zsh.
> > Phil.
> > ATTACHMENT part 2 application/x-sh
> > ATTACHMENT part 3 application/x-sh
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
Messages sorted by: