Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: #conpdef and compadd -> command regex
- X-seq: zsh-users 17145
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: #conpdef and compadd -> command regex
- Date: Sat, 16 Jun 2012 00:22:27 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iyac2xZ6mk/YIfJFahHvOBvVqRISl3cvWcddtqQkPM0=; b=DTqsm50OpV266nCLj4HQvPOrPbyHDrKf+CuywFQRQHYjbhHiyPO9gYCunL8RbyCbV/ MkVaJwYioKg/YxV0eKRz3X/HKWP4oS54cM6N4haGIK2rH53UeLOqSYEMgeXgt0TpeDhk iJcHJRHgW2tRZdl6TszlFjnUvWgPbb7DPkcT9oLaKXxM6cu6HzL2HtfeOd8vEJ8KzNBA xb1SCaiFYbRr11k6RxJZp89i9FYKlLAIDjIG1sT/wNf4sJpErw8tuNdh3SkZ4ZPc246q nlF1fWBHSW8gVo3BGJVu84YNmhHJlwgGcY0ufh8WES9S3SaCEr5v9oVZ0yP7hts4bJ1q EJBA==
- In-reply-to: <mailbox-29608-1339788055-484725@pepper>
- 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: <20120521214023.GB10763@lorien.comfychair.org> <120521194232.ZM990@torch.brasslantern.com> <20120522050158.GC26384@lorien.comfychair.org> <20120522051617.GD26384@lorien.comfychair.org> <mailbox-14780-1339753132-855345@pepper> <CAHYJk3S9wrU5eMGZO=K9J6cg2nO1zfp1S5NjsuuH2NVqYsLcHQ@mail.gmail.com> <mailbox-29608-1339788055-484725@pepper>
On 15/06/2012, Eric Smith <es@xxxxxxxxxxxx> wrote:
> Thank Mikael
>
> That works but I realise that I only want completion if the
> command commences with a single underscore. How would I define a
> regex for the command that needs to be satisfied for the compadd
> rule to apply?
You can't afaik, but in your completer you can do whatever you want,
including checking what the word looks like and calling another
completer if it's not what you want. (I'll admit I don't know which
that would be in this case, _command_names is close, but _autocd could
also be called depending on options).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author