From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21275 invoked by alias); 16 Jul 2012 20:51:59 -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: 17177 Received: (qmail 18517 invoked from network); 16 Jul 2012 20:51:58 -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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120716135134.ZM4515@torch.brasslantern.com> Date: Mon, 16 Jul 2012 13:51:34 -0700 In-reply-to: Comments: In reply to Eric Smith "autoexpand dirs to depth n" (Jul 15, 8:49pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: autoexpand dirs to depth n MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jul 15, 8:49pm, Eric Smith wrote: } } How do I configure completion to display all directory expansions to a } depth of n? In what context? Command position (e.g., first word on the line)? Or following what other input? If the former, you'll very likely need a custom widget with its own key binding, rather than overloading TAB. If there's other context there may be a way to write a custom completer to do it. } Then when I identify the branch I want to expand What does "identify the branch" imply? Mechanically (e.g., in terms of keystrokes), how do you want to "identify" it? After you "identify" it, does it get inserted on the command line so it becomes a prefix for the next step? } I want to use globbing so that Globbing won't match directory separators in the filesystem (see PWS's reply). However, if you've already generated a listing of all the possible files and directories somehow (e.g. "find ... -maxdepth n"), you could then apply a pattern completer (such as _multi_parts) to pick out the appropriate subset.