Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: detect if compinit was run and rerun
- X-seq: zsh-users 23421
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: detect if compinit was run and rerun
- Date: Fri, 1 Jun 2018 16:52:28 +0100
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180601155231euoutp01305c2873ecf98305d5a12097365225b0~0FCuw5a_31850918509euoutp01m
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1527868351; bh=sdqIQBlSkTiT7XMIxbYVbKHI/y3q8jeNth0WbLxWxzU=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Uew31VQLLcEMCxGl+jqMghYbFxdlgsSyFtjiddF/IIqdtU8uKmSjrsyoat6jv3iuJ 0c+TmB03rx/Ld/B0xUDHyQaqBqes88L2to0yCY2Ro8FQUKPZyseMmOvlJy3TlKlH/5 RAAI+VpGsZpoy8+07z9YX1NxyMxQ954n+spqX07Q=
- In-reply-to: <20180601145818.GC17967@robusta>
- 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
- Organization: SCSC
- References: <CGME20180601145937epcas3p38d330847971b65037b3a1596f186f9e9@epcas3p3.samsung.com> <20180601145818.GC17967@robusta>
On Fri, 1 Jun 2018 16:58:19 +0200
Paul Seyfert <pseyfert.mathphys@xxxxxxxxx> wrote:
> I am therefore wondering if I can detect if `compinit` has already
> been called and rerun it if so.
if (( ${+_comps} )): then
...
fi
should be good enough in the vast majority of cases. _comps is only
setup within compinit or by compdef which isn't defined until compinit
runs. So this only fails if the user is doing something very personal
best kept to the privacy of their own home.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author