Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: autoexpand dirs to depth n
- X-seq: zsh-users 17177
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: autoexpand dirs to depth n
- Date: Mon, 16 Jul 2012 13:51:34 -0700
- In-reply-to: <mailbox-6514-1342377510-915747@pepper>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <mailbox-6514-1342377510-915747@pepper>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author