Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion issue when zsh is not the default shell
- X-seq: zsh-users 23734
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Julien Nicoulaud <julien.nicoulaud@xxxxxxxxx>
- Subject: Re: Completion issue when zsh is not the default shell
- Date: Sun, 28 Oct 2018 00:20:42 -0400
- Cc: Mailing-list zsh-users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201808; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+3VvYtMOfVuOJxL5xxJAVn12KPIJ6Nit1i0kya5OZVI=; b=e3EVsx9svFH+Q/NVdg2a64gdbz N2AwZJdgAkrEihBgLpaW7x+floCZyIGKHd5vdhk2xibJwpXwcspXPIIJy8L6LVUWrbOcBcWW3v2WD +q7KfeNbYCvv0h/Du/YT+80yVIiDwkL3IJO6MOnFmfVJ12i4MZ5x/wGeGDQgW9glq8iIgMPmbOmST judB0TDqfEzDl3XpOEEms+aY2jigC/GiirUKMBrABrZyJFtEIgwZEbMT5E3KnkRO2LiSJ9hbE16Ck CU/2t0laZ3CrNeQUCDDP+BBNVEhc1udjEstQcN3pHrzoCwlDHdJjFzBKC2OBGstQWxncnJHPoEety 1zNg5JRQ==;
- Dkim-signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201808e2; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+3VvYtMOfVuOJxL5xxJAVn12KPIJ6Nit1i0kya5OZVI=; b=13lk774nWOqx7p0YeACL0dTx3 Kc5hXlEcLGK3Yg/G6m25GUmeoOI4OO+FzEMa1uaSYT/+1W6NPbR75DNWT6oCA==;
- In-reply-to: <CA+mcLN4E3Ggqy1aWubue1VyNMoKoyBuvshgXRN+YnAhSnZ9Rfw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc
- References: <CGME20181026142713epcas1p2bcbd7c6efff6d9e809fdbedb51eb6eba@epcas1p2.samsung.com> <CA+mcLN5PjYfJ_yv1xDZW1+0XC7Lok85UGzChq0iUdKXrHD2ULA@mail.gmail.com> <20181026145522eucas1p245580c8ddf13dca70b5eae45af9a0205~hMFzZ7wLw1740617406eucas1p2G@eucas1p2.samsung.com> <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author