Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion for compilers (cc, gcc...) and -o
On Thu, Apr 30, 2020 at 3:36 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Daniel Shahaf wrote on Thu, 30 Apr 2020 22:34 +0000:
> > Vincent Lefevre wrote on Thu, 30 Apr 2020 22:54 +0200:
> > > Now I'm wondering whether there is a way to automatically apply
> > > the zstyle to the _gcc command list (I also sometimes use clang
> > > and so on).
> >
> > zstyle -e ":completion::complete:*:option-o-1:" file-patterns '(( ${+funcstack[_gcc]} )) && reply=( … )'
>
> I meant «${+funcstack[(r)_gcc]}», of course.
You don't need zstyle -e if you use zstyle after compinit:
zstyle :completion::complete:\(${(j:|:)${(@k)_comps[(R)_gcc]##-*}}\):option-o-1:
...
Messages sorted by:
Reverse Date,
Date,
Thread,
Author