Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mapfile module - avoiding $(...) in completion functions
- X-seq: zsh-workers 9255
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: "ZSH workers mailing list" <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: mapfile module - avoiding $(...) in completion functions
- Date: Thu, 06 Jan 2000 20:19:39 +0000
- In-reply-to: ""Andrej Borsenkow""'s message of "Thu, 06 Jan 2000 10:32:54 +0300." <000401bf5818$3e881bb0$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
"Andrej Borsenkow" wrote:
> May be it was discussed already, but is not mapfile module alternative to
> $(...)? We mostly need it to parse files content, as in
> $(</etc/printcap), and in this case we could just as well mmap the file.
There's no real efficiency issue here --- $(<...) is handled without
forking, just by reading the file in, so while mapping may in principal be
quicker the gain is certainly negligible.
mapfile is supposed to do this, too, if it doesn't find enough memory
management tools, so it should be safe to use anyway. However, it's not a
particularly good idea to keep requiring extra modules for completion to
work: completion is a basic feature, and the modules are supposed to be
optional to avoid the overhead. This is even worse, for obvious reasons,
if the shell is statically linked.
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author