From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-users@zsh.org
Subject: Re: default completion function
Date: Mon, 12 Mar 2018 00:19:29 +0100 [thread overview]
Message-ID: <CAP+y1xCj2WPxUmT91yb9B4hJm2aYMco9Jw78-SV0rR5N6PM3aA@mail.gmail.com> (raw)
In-Reply-To: <180311112053.ZM2186@torch.brasslantern.com>
[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]
that worked very nice, thank you!
2018-03-11 19:20 GMT+01:00 Bart Schaefer <schaefer@brasslantern.com>:
> 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@gmail.com> 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@gmail.com
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
fondatore: https://www.meetup.com/it-IT/Machine-Learning-TO
prev parent reply other threads:[~2018-03-11 23:20 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
2018-03-11 18:20 ` Bart Schaefer
2018-03-11 23:19 ` Pier Paolo Grassi [this message]
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=CAP+y1xCj2WPxUmT91yb9B4hJm2aYMco9Jw78-SV0rR5N6PM3aA@mail.gmail.com \
--to=pierpaolog@gmail.com \
--cc=schaefer@brasslantern.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).