Zsh Mailing List Archive
Messages sorted by:
Re: How to disable completion for a builtin? (actually a reserved word) + an apparent bug
- X-seq: zsh-workers 44578
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Subject: Re: How to disable completion for a builtin? (actually a reserved word) + an apparent bug
- Date: Wed, 24 Jul 2019 16:48:27 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190724154830euoutp010fdb9754b114813d2e42cc8aa3a085e1~0YojCJi4A1073010730euoutp01a
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1563983310; bh=Wdh4VgTcmpFlATZGeUojlvHjq2oFRUI9pQxfT0YId4E=; h=Subject:From:To:CC:Date:In-Reply-To:References:From; b=FmSLX66YZt1jxixyXPfuOqNsbwiBZpyVMwV3qcfsNqZLsDL73XGF1y6MWGcqZnvx0 ZVScBVUTYkwrcAjegdu1Xf1hz2RsLdAEe/0Qq2/EpHXopgjdDsMGjIbY8BlNgmVmLM RWU5OYvYTFIF3hZAF6d61s19gvsjp+63mMfRHrDU=
- In-reply-to: <CAKc7PVAN7BtCRRX0rJAN29PUbTQyR6ot_SicMLzoHFFE4CVz+Q@mail.gmail.com>
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- List-unsubscribe: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CGME20190724141945epcas1p30d69e2d7ba1ce29f994ff486284d4553@epcas1p3.samsung.com> <CAKc7PVCfdhuam4WPxhO2TWkpRpyHdwoCTXH=Eshdb=pGRO0TxA@mail.gmail.com> <firstname.lastname@example.org> <CAKc7PVAcW8BhwGQaXYWSW-tkMx6b7LLQsJ35pjq9567NY+Cemail@example.com> <firstname.lastname@example.org> <CAKc7PVAN7BtCRRX0rJAN29PUbTQyR6ot_SicMLzoHFFE4CVz+Q@mail.gmail.com>
On Wed, 2019-07-24 at 17:39 +0200, Sebastian Gniazdowski wrote:
> śr., 24 lip 2019, 17:15 użytkownik Peter Stephenson <p.stephenson@xxxxxxxxxxx> napisał:
> > On Wed, 2019-07-24 at 17:02 +0200, Sebastian Gniazdowski wrote:
> > > On Wed, 24 Jul 2019 at 16:28, Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> > > >
> > > >
> > > > On Wed, 2019-07-24 at 16:18 +0200, Sebastian Gniazdowski wrote:
> > > > > accomplish this?
> > > > unset '_comps[declare]'
> > > Actually that's not what I've meant. I've should have put this more
> > > clearly: how to prevent command `declare' from being completed? Like
> > > if chmod -x /usr/bin/declare?
> > Either you have a special completion, or it does default completion.
> > If you don't want default completion, you need a compdef for a do-nothing
> > completion function.
> > pws
> I don't want to change disable's completion. What I want is that:
> % decl<TAB>
> will not try to complete "declare".
declare is usually a builtin. If you disabled that it should
remove it from the list of enabled builtins and reserved words
and it won't complete.
disable -r declare
(they're different because the reserved word needs to do
special parsing for arrays that an ordinary builtin doesn't.)
If you really have an external command called declare, remove
it from the hash table:
Messages sorted by: