From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16232 invoked by alias); 10 Nov 2017 23:22:06 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 22962 Received: (qmail 25193 invoked by uid 1010); 10 Nov 2017 23:22:06 -0000 X-Qmail-Scanner-Diagnostics: from mail-pg0-f41.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.83.41):SA:0(-1.9/5.0):. Processed in 1.182855 secs); 10 Nov 2017 23:22:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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=J0wYsXbxLa4evwo5kfzcXokXFWAVseVqLvX5EfWh35w=; b=IQe0puU6YPQgTz9GNNrmo9BZD6aGA/bVo/RNB77Kx7XJu7BijoaCD3IA/SFDP2Zsee EU4RBigJ1wL9/xC79ws8Hea7gvF784i7axbosQAEi6oRMKfVj0lYnsIl+aAmYjy2XNky RQA1cWXJ7qa5bfKeiaEiSiIm5c1FJonKjLIFN9oMHL0/y17IzfTnh1ty6E91R9qDLwVA o49KCWb3rv+HOuRDU1AWOdnsa3U1zBtVKxQyp9CbL86d7s4mR7d+57pw67YCwMG+eS7p uj9D2b/EMIq8sGAyVRdsSfIG7DyG+3YtjoYjc9V1TtRjgDUaKFeX+Lka+LGD2Rl7DuP9 nutw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=J0wYsXbxLa4evwo5kfzcXokXFWAVseVqLvX5EfWh35w=; b=GFjHCYuuBft0VbApTBMQV9k/CGwThC3CLHdpNec0BnkdTJnjacZ+DQ+qdhC300zvS+ Ry8e5VdPoae6nS06K9HmhP+uhnuWCr8JoOLUytGnXdeJ90ICqhDt8XPQ+0u4MFys7GDN 98vBgCPRj4LyFamZ4h27p8su6zGVVe/AyApzNfyvKWrDNx5IQBBWzqAuWDrGVlKCV7gw 94usbWRmiYQ1LeEWrtCNqDLSAsrI+byeZ7Wt5Z1gvqJDir+JkV4+CEyATKdcV3+sBGr7 0RlCTeYDbRBWkVhTldLGFMMvmtoGuj4DvFcDb/JWCUIRk0umPBqmnFsSZ26IjPEOGE2b +cRg== X-Gm-Message-State: AJaThX7gBX6y4elkgP+gyGhtT3D8rnJFVEuFXfTOXevD6Hrf+b657JD/ La2R9C0YY+elJTIZL4wRA4QLE1rP X-Google-Smtp-Source: AGs4zMbiLFU6R3BvohFrTDLiHxEVrMui8b1gQz1o1xbyKYvGi7HoiQRgRyktwlPYwZ3v3oj87uihrw== X-Received: by 10.99.164.81 with SMTP id c17mr1874473pgp.112.1510356122336; Fri, 10 Nov 2017 15:22:02 -0800 (PST) From: Bart Schaefer Message-Id: <171110151510.ZM16558@torch.brasslantern.com> Date: Fri, 10 Nov 2017 15:15:10 -0800 In-Reply-To: <171110144246.ZM16292@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: compctl help needed for IRC channel names" (Nov 10, 2:42pm) References: <171110144246.ZM16292@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: compctl help needed for IRC channel names MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii [Oops, that got sent accidentally before I was finished.] } } But, when I choose channel1 or whatever, it should return the full real } } path (/path/network1/#channel1) } } } } How can I do this? With compinit, you'd do something similar to the compctl solution that you worked out, but it might be a bit simpler. One thing you haven't told us is whether you want this to apply every time you complete one of these file paths, no matter what the command name might be, or whether this is specific to a particular command. The approach might be somewhat different, depending. With compinit, you define a list of functions via the "completer" style. To generically perform your desired operation on file paths, you would write a completer fuction and include it in the completer style at a point you feel appropriate. For a particular command, you'd write a function that generates the list of matches and associate it with the command name by using "compdef". If you're interested in following up on this approach, some more detail about the context would be helpful.