zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Pier Paolo Grassi <pierpaolog@gmail.com>, zsh-users@zsh.org
Subject: Re: default completion function
Date: Wed, 07 Mar 2018 13:52:10 +0000	[thread overview]
Message-ID: <20180307135210.7fb19043@camnpupstephen> (raw)
In-Reply-To: <CAP+y1xCDp_i1dMVCW83MOcJn2pHMxewwnGSpusAe5U6GLrDR8Q@mail.gmail.com>

On Wed, 7 Mar 2018 13:28:38 +0100
Pier Paolo Grassi <pierpaolog@gmail.com> wrote:
> Hello everybody, I would like to make the completion function
> _gnu_generic the default completion for those functions that don't
> have something more specific attached to them.
> If I use:
> 
> zstyle ':completion:*' completer _gnu_generic
> 
> a command like docker that has his own completion loses it and gets
> completed with _gnu_generic.
> How can I set a default like that without overwriting existing more
> specific completion?

The obvious way (so probably this is too simple) is to override the
function _default, the normal version of which you'll find in your
$fpath.  As long as your function starts with "#compdef -default-" and
is earlier in your $fpath it should be used in preference.

pws


  reply	other threads:[~2018-03-07 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180307123046epcas2p3556030f6d223cd5943cc628df87eea6e@epcas2p3.samsung.com>
2018-03-07 12:28 ` Pier Paolo Grassi
2018-03-07 13:52   ` Peter Stephenson [this message]
2018-03-11 18:20     ` Bart Schaefer
2018-03-11 23:19       ` Pier Paolo Grassi

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=20180307135210.7fb19043@camnpupstephen \
    --to=p.stephenson@samsung.com \
    --cc=pierpaolog@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).