Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Autocomplet with compdef _precommand
- X-seq: zsh-users 21824
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Autocomplet with compdef _precommand
- Date: Wed, 31 Aug 2016 02:35:10 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=uEMcuVxIzgtMyzFv czJWU9iuB84=; b=izqeELJOzTxFGEAWHQHt//5uG+I5pHcm6bSV37n8fGf7unHi Oa2OahsExflDJB4rcjTlb5oKf5fNuhIaWXpQ6jnbANLUQJpx4HYJa4wEbVJ6DEKT 0gASLe+y8MGThIDZLKLgYrYNIv7MIFc4mxgYzItKhcEQjqq4uDB7nh2jDME=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=uEMcuVxIzgtMyzF vczJWU9iuB84=; b=tnLz3ZDhX2Z1PduAqgWBb4d7LNJHzhTJAH5z2pKOC5MyELa 84A/7Qb/j0oixtsBpMeecsP2YpqcfCSsOzO3/sQG1XJsKRqz28nOtZ55VyBt8GAB v19ihNQrTp9jpfjxPeVS+/yPCVk6Mqixz8lTlr3pbOkTe5mC1LwnGrB3nQ88=
- In-reply-to: <160830105636.ZM25657__30145.0480045334$1472579856$gmane$org@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>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CADprNY=V7FJPkpFQGSLfTVN=qTE5R-pQaHQ3Y3qN3PpD2GLYew@mail.gmail.com> <160830105636.ZM25657__30145.0480045334$1472579856$gmane$org@torch.brasslantern.com>
Bart Schaefer wrote on Tue, Aug 30, 2016 at 10:56:36 -0700:
> More generically, the only zstyle that modifies autocd behavior is for
> the "-command-" special context, so you have to use "zstyle -e" with
> an evaluated test that determines whether "start" was the precommand
> word AND whether the tags are being looked up for "cd":
>
> zstyle -e :completion::complete:-command-:: tag-order \
> '(( $precommands[(I)start] && $funcstack[(I)_cd] )) && reply=(-)'
>
> Question for zsh-workers: Is it worth adding a style to _precommand
> to selectively turn off autocd? If so, what should it be called?
Isn't that already possible? —
zstyle -e :completion::complete:-command-:: tag-order \
'(( $precommands[(I)start] )) && reply=("!local-directories" -)'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author