From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: zrecompile -p -R/-M has no effect
Date: Wed, 23 Sep 2015 23:36:20 +0200 [thread overview]
Message-ID: <CAHYJk3QKOoxC=62Twzo9ZNqxWVv6+KAO-GFxgmoj3g5rDzJ-Jg@mail.gmail.com> (raw)
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
next reply other threads:[~2015-09-23 21:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 21:36 Mikael Magnusson [this message]
2015-09-24 3:03 ` Bart Schaefer
2015-09-24 3:32 ` Mikael Magnusson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHYJk3QKOoxC=62Twzo9ZNqxWVv6+KAO-GFxgmoj3g5rDzJ-Jg@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).