Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: default completion function
- X-seq: zsh-users 23234
- From: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: default completion function
- Date: Mon, 12 Mar 2018 00:19:29 +0100
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Gs5H1/6mQBwamnguI+uwOG+rK3CkcGzWW5tuAL2t9Us=; b=hqtC7ensWMVh75VTNGv1TmoyZpgeYYTmOD/RdjbGMfQw9dwuCtWez6YsM0oLDsysmM QckPnfTz56uRuk6Lp2Ac2S47oHXfB2BCD2rUNemtkQxbI05tVyLLncjtotqSfKvUnWt/ ocUuIz4k2zR8Lwrn2coAW2IOfjnKjXYccpQY5ol9fuj4z6j8yLzaGnYJhjpoQNBXrpkr fyCyMQY3sd/75G75jXSK4qA7IU7eWwESzofwQ4TyBQflk5UiD37nb4NjLH5qZk5kxE7w ACUKYXtBD6S5QXCLFcnkit17wvewWvgEBYZH0NqOvNggmjHECPT/Xr6E2jrIuGCU+IG2 IwzA==
- In-reply-to: <180311112053.ZM2186@torch.brasslantern.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
- References: <CGME20180307123046epcas2p3556030f6d223cd5943cc628df87eea6e@epcas2p3.samsung.com> <CAP+y1xCDp_i1dMVCW83MOcJn2pHMxewwnGSpusAe5U6GLrDR8Q@mail.gmail.com> <20180307135210.7fb19043@camnpupstephen> <180311112053.ZM2186@torch.brasslantern.com>
that worked very nice, thank you!
2018-03-11 19:20 GMT+01:00 Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>:
> On Mar 7, 1:52pm, Peter Stephenson wrote:
> } Subject: Re: default completion function
> }
> } On Wed, 7 Mar 2018 13:28:38 +0100
> } Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
> } > 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.
>
> I wouldn't recommend that. The _gnu_generic function falls back on
> _default so this potentially creates infinite recursion.
>
> Much better: compdef _gnu_generic -default-
>
--
Pier Paolo Grassi
email: pierpaolog@xxxxxxxxx
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
fondatore: https://www.meetup.com/it-IT/Machine-Learning-TO
Messages sorted by:
Reverse Date,
Date,
Thread,
Author