Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: compctl help needed for IRC channel names
- X-seq: zsh-users 22960
- From: Aleksandr Miroslav <alexmiroslav@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: compctl help needed for IRC channel names
- Date: Tue, 7 Nov 2017 16:08:14 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=z/U2+tW2hnaTeGctURBm7qOxENGnvTvOQzxPyg//i8g=; b=dXc6Q4D+Omr+TF99mMWB7QE7618U8CynmrvCxA3DwK8wk6Vrr0lZStfV4ZH4ycriX/ xu3mr7N5tZL7uXFip7DRUom4eq7Q3LChqFwaPnAVZJQhuIydW9/dAGiKn30eT3LaMJtF fNWKQYmi+0bv0UeoOlORNEu/WNXOlOOJt6ITUzfOq60cycMr2I9jaPKsZNARglMEf9y3 6rXoLvW1+CKacZXk0UKjhdDgRcaAoveIeII2tRm39TmTZbbZMVqpn44o40LicKZAEZOr mCTjdrUVOz2/Ulf1KoAYFImkZRdNES/jwG1xGZOGnzhZUTqoi/F6vLBzKcx23zYpDglN R6LQ==
- In-reply-to: <CACcSE1xm8noE1p8mtR=jxhVjmOkkL=QwbLqtLGPW6urbj11gWQ@mail.gmail.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>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CACcSE1xm8noE1p8mtR=jxhVjmOkkL=QwbLqtLGPW6urbj11gWQ@mail.gmail.com>
I solved this by writing a small script that listed the main directories
and converted them to an abbreviated form.
I feed the abbreviated list to compctl -k, and then I also added a
"converter" which takes the abbreviated form and converts it back to the
full path, which I use in my command.
On Tue, Nov 7, 2017 at 1:13 PM, Aleksandr Miroslav <alexmiroslav@xxxxxxxxx>
wrote:
> My IRC bouncer (ZNC), writes out IRC logs into directories that look like
> this:
>
> /path/network1/#channel1
> /path/network1/##channel2
> /path/network1/user1
> /path/network2/#channel3
> /path/network2/##channel4
> /path/network2/user2
>
> I would like compctl to autocomplete for me with these options:
>
> channel1 channel2 user1 channel3 channel4 user2
>
> But, when I choose channel1 or whatever, it should return the full real
> path (/path/network1/#channel1)
>
> How can I do this?
>
>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author