Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: default completion function
- X-seq: zsh-users 23220
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: default completion function
- Date: Wed, 07 Mar 2018 13:52:10 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180307135215euoutp021be9ae941811166301db7a56c88f12e1~Zp7K82Zud0888308883euoutp02N
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1520430735; bh=atGbjXPtjMxZ4l/PJ+j3qoexxIR6sp+ndIIerdcoIHs=; h=Date:From:To:Subject:In-reply-to:References:From; b=ggC2XPTcW2+982LUvhKJTB+UC6GxNCSoT44Kna1nSYyJg2yFHJizYTa/urA28HAzr qAxzz4ZD+5asiJGwM0Yl1x0HKSOFdxTsKio+2cBUxjtpnW7IrFTSf8Fmh+M4jpGrxP 09sF4q0F/tfdHMbUeCw7eBMRRpshzqPo0TzngVus=
- In-reply-to: <CAP+y1xCDp_i1dMVCW83MOcJn2pHMxewwnGSpusAe5U6GLrDR8Q@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
- Organization: SCSC
- References: <CGME20180307123046epcas2p3556030f6d223cd5943cc628df87eea6e@epcas2p3.samsung.com> <CAP+y1xCDp_i1dMVCW83MOcJn2pHMxewwnGSpusAe5U6GLrDR8Q@mail.gmail.com>
On Wed, 7 Mar 2018 13:28:38 +0100
Pier Paolo Grassi <pierpaolog@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author