Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: default completion function
- X-seq: zsh-users 23230
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: default completion function
- Date: Sun, 11 Mar 2018 11:20:53 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=zoH6iTMWR2ls3QE7qse6F0MLsDQG3R3pA+JAGI3Wyg0=; b=vzhoZNaGHQZvqIwl6EO9f3MF4pE+e0cvakHsbs/6YKduYZD4V7PWp9LQTuRyavsrfC nUmUiwVrOdQ6MwH2AId3mMYCkMvwiBBdr0oI1T4qW6GyuGxIWlf7nhJQ0Ent1F/RaokY L3EWmuATTozkPZN75mtWfZO+eFcahl2TF1bw6jTli2cisZgL5DiM90SeIAEAGRt50tTL BI9gF10bAytjc8yXTAc7VIXD3LcxopWGQ+1iyXFd02CyiXwjup+oxbfZPuhCUPOpsy1N OTYmMOcTJZBc5/A19O10+8IQ3iSx+zSfQS5ojDSObuVIsSxuwfeJTXOGXxbZoHCbjmEd fdEw==
- In-reply-to: <20180307135210.7fb19043@camnpupstephen>
- 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>
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-
Messages sorted by:
Reverse Date,
Date,
Thread,
Author