zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Julien Nicoulaud <julien.nicoulaud@gmail.com>
Cc: Mailing-list zsh-users <zsh-users@zsh.org>
Subject: Re: Completion issue when zsh is not the default shell
Date: Sun, 28 Oct 2018 00:20:42 -0400	[thread overview]
Message-ID: <20181028042041.GA21249@osmium.pennocktech.home.arpa> (raw)
In-Reply-To: <CA+mcLN4E3Ggqy1aWubue1VyNMoKoyBuvshgXRN+YnAhSnZ9Rfw@mail.gmail.com>

On 2018-10-26 at 20:49 +0200, Julien Nicoulaud wrote:
> suspect this is related to bytecode compilation, I have this snippet at the
> end of my zshrc:
> autoload -U zrecompile && zrecompile -p $MAIN_USER_HOME/.{zcompdump,zshrc}
> &>/dev/null

My understanding is that << zrecompile -p FOO >> passes FOO through as
arguments to zcompile, so you're invoking:

  zcompile $MAIN_USER_HOME/.zcompdump $MAIN_USER_HOME/.zshrc

which is the "zcompile file [ name ... ]" form, so you're compiling
.zshrc into the file .zcompdump (instead of .zshrc.zwc).

I think that just removing the "-p" should work.  (But I've not tried to
reproduce your breakage).


What happens if fpath is broken and zrecompile can't be autoloaded?
What if you fixed such a breakage in .zshrc, but you're not recompiling
and the old fpath is still being used from the binary file, even while
the source files are correct?

This should be "zsh -e" safe, while still giving you more clues what's
failing if things fail:

if ! autoload -U zrecompile ; then
  print -u2 ".zshrc: warning: failed to autoload zrecompile, is fpath okay?'
else
  zrecompile $MAIN_USER_HOME/.{zcompdump,zshrc} || ev=$?
  if (( ev )); then
    print -u2 ".zshrc: warning: zrecompile failed, exiting $ev"
  fi
fi


  reply	other threads:[~2018-10-28  4:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20181026142713epcas1p2bcbd7c6efff6d9e809fdbedb51eb6eba@epcas1p2.samsung.com>
2018-10-26 14:25 ` Julien Nicoulaud
2018-10-26 14:55   ` Peter Stephenson
2018-10-26 18:49     ` Julien Nicoulaud
2018-10-28  4:20       ` Phil Pennock [this message]
2018-10-30 15:19         ` Julien Nicoulaud

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=20181028042041.GA21249@osmium.pennocktech.home.arpa \
    --to=zsh-workers+phil.pennock@spodhuis.org \
    --cc=julien.nicoulaud@gmail.com \
    --cc=zsh-users@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).