Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
_expand_word
- X-seq: zsh-workers 10829
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: _expand_word
- Date: Wed, 19 Apr 2000 14:55:31 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I was hoping to be able to use _expand_word, bound to ^Xe, as more or less
a drop-in replacement for ^X* --- which is presumably what it should be.
However, you need to set some styles for this to work. I set
zstyle ':completion:expand-word:*' glob 1
zstyle ':completion:expand-word:*' substitute 1
zstyle ':completion:expand-word:*' original false
zstyle ':completion:expand-word:*' tag-order '!original'
(maybe I don't need substitute) and it now does pretty much what I expect;
one slight exception is that it leaves the cursor right after the expansion
with no space if there's just the one expansion. It would probably be good
if there was some way to have these set by default for expand-word without
stamping on anything supplied by the user, and without affecting the use
of _expand from the completer list.
Another problem is one we've met before, that things like $PATH have the
`$' stripped before the ever get here and can't be expanded. This is highly
counterintuitive in this case.
A more minor issue is that it would be good to have a way of listing
expansions as a replacment for ^Xg. This could easily be done with a
compdef -K at the top of _expand_word with a binding to e.g. ^Xd. I could
even do that myself.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author