zsh-users
 help / color / mirror / code / Atom feed
From: Aleksandr Miroslav <alexmiroslav@gmail.com>
To: zsh-users@zsh.org
Subject: Re: compctl help needed for IRC channel names
Date: Tue, 7 Nov 2017 16:08:14 -0800	[thread overview]
Message-ID: <CACcSE1xiLv5soUt=cp4nan9fp7qOoX=cXNrDgJA-Ewsc8eLH_g@mail.gmail.com> (raw)
In-Reply-To: <CACcSE1xm8noE1p8mtR=jxhVjmOkkL=QwbLqtLGPW6urbj11gWQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

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@gmail.com>
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?
>
>
>

  reply	other threads:[~2017-11-08  0:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-07 21:13 Aleksandr Miroslav
2017-11-08  0:08 ` Aleksandr Miroslav [this message]
2017-11-10 22:42 ` Bart Schaefer
2017-11-10 23:15   ` Bart Schaefer

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='CACcSE1xiLv5soUt=cp4nan9fp7qOoX=cXNrDgJA-Ewsc8eLH_g@mail.gmail.com' \
    --to=alexmiroslav@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).