Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: help with _match, globcomplete etc. (with a PATCH)
- X-seq: zsh-workers 9756
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: help with _match, globcomplete etc. (with a PATCH)
- Date: Wed, 16 Feb 2000 06:47:42 +0000
- In-reply-to: <38A9AECE.5B213E7@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <200002151608.RAA14415@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <38A9AECE.5B213E7@xxxxxxxxxxxxx>
On Feb 15, 7:53pm, Oliver Kiddle wrote:
} Subject: Re: help with _match, globcomplete etc. (with a PATCH)
}
} zsh -f
} bindkey -me
} unsetopt glob
} typeset -A code
} code[ai]=foo
} echo $code[ai]/{a,<tab>
All I get from that is a beep, before Sven's 9749, and
zagzig% echo foo/\{a,
^note trailing space added
with 9749 applied.
Of course that seems wrong, too. I didn't want the brace to be quoted.
What output do you see?
} The main limiting factor on my configuration is that I can't do
} parameter expansion, command substitution and arithmetic expansion
} independantly.
Hmm. This would almost have to be done in C code; if you have more
than one of the three forms in the same "word", it'd get pretty messy
to dismantle it to expand only the appropriate substring(s).
} Also, I can't see a way of doing globbing, while preserving variable
} references.
This strikes me as nigh impossible in the general case. What would you
expect to see if you invoked the "glob but preserve variables" expansion
in a case like:
zsh% arr=('[sS]' Src/M ../)
zsh% print -l ${~^arr}*
?? Or do I completely misunderstand what you're asking?
(I note that on that example expand-word produces a list of files but
the _expand completer (with substitute and glob styles set to 1) only
beeps, with or without 9752 applied. Is that the right behavior?)
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author