From: Bart Schaefer <schaefer@brasslantern.com>
To: Pier Paolo Grassi <pierpaolog@gmail.com>, zsh-users@zsh.org
Subject: Re: default completion function
Date: Sun, 11 Mar 2018 11:20:53 -0700 [thread overview]
Message-ID: <180311112053.ZM2186@torch.brasslantern.com> (raw)
In-Reply-To: <20180307135210.7fb19043@camnpupstephen>
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-
next prev parent reply other threads:[~2018-03-11 18:21 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 [this message]
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=180311112053.ZM2186@torch.brasslantern.com \
--to=schaefer@brasslantern.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).