Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zrecompile -p -R/-M has no effect
- X-seq: zsh-workers 36602
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: zrecompile -p -R/-M has no effect
- Date: Wed, 23 Sep 2015 23:36:20 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=zKy9HrNkTRY0o5qElqNWm55APaq/wMCOg3pRUzZSCdg=; b=Ot0zaInHn6GiRe6z1Jg6hPUTsZwF1lnt5A4GJnb8wo7DSHtYeQ2x+4zwjus3dI/x3g X94weonMOYM/69kcEv9efxARkUnEWXOustq1HzvjlMLkMf/qIGYMj6uLQcGd6mRCTNW7 VFR4RkcRCFuadoBUuPH4rFH3KnnvIOzJEH3+iN1+WdoNbVGgJJNelrg3p7K7ZMesMOst Ogu4NxVx29BLXBJnjtavFo4yvpo4oCjTw8Oth+1iWfTsmHq8yKexekpRL/g6xG8lGMP1 IC/kzFkuRg9/e8mPD3/4yT8r1JGCEqJeY6kRr9ODttHbmcuARwZAS93HxYogkGOTrsLA EBsA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I noticed a while ago that my .zshrc.zwc stayed mapped forever, so I
tried to give -R to the zrecompile invocation that handles my init
files, but
% zcompile() { >&2 echo -E - zcompile "$@"; builtin zcompile "$@" }
% touch .zshrc; zrecompile -p -R .zshrc
zcompile -t .zshrc.zwc
re-compiling .zshrc.zwc: zcompile .zshrc.zwc .zshrc
succeeded
It ate my -R. If you try to reproduce this locally, note that read is
the default for small files, so try also with -M to see if you can
change it to (mapped) instead of vice versa as here.
% builtin zcompile -t .zshrc.zwc
zwc file (mapped) for zsh-5.1.1-dev-0-mika
.zshrc
% builtin zcompile -R .zshrc
% builtin zcompile -t .zshrc.zwc
zwc file (read) for zsh-5.1.1-dev-0-mika
.zshrc
The example in the manpage even uses this as an example;
If the -p option is given, the args are interpreted as one or more
sets of arguments for zcompile, separated by `--'. For example:
zrecompile -p \
-R ~/.zshrc -- \
-M ~/.zcompdump -- \
~/zsh/comp.zwc ~/zsh/Completion/*/_*
It looks like there is a getopt thing trying to check for these, but
presumably it doesn't work,
while getopts :MR opt $files; do
case $opt in
[MR]) map=( -$opt ) ;;
*) tmp=( $tmp $files[OPTIND] );;
esac
done
...
zcompile $map $tmp $zwc $files
I have no idea how getopt works, so if anyone thinks "ah, what an
obvious and easy fix" when seeing this, that would be nice.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author