From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2529 invoked by alias); 2 Dec 2013 14:33:48 -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: X-Seq: 18180 Received: (qmail 22142 invoked from network); 2 Dec 2013 14:33:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Mon, 2 Dec 2013 15:26:14 +0100 From: Eric Smith To: Zsh Users Subject: implementing a control for completing filenames with a defined list of tokens Message-ID: <20131202142614.GA27697@trustfood.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Wise zsh'lers, I would like to define a completion widget to complete filenames with a defined list of tokens. The widget would look up in a list the tokens and suggest these (ideally in order) to the user. As an example; $ cat tokenfile token1 token2 token3 User has the binding control-k to execute the completion function; mv Then the widget would supply mv token1 token1 token2 token3 How would I best implement this? -- Eric Smith