Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: autoexpand dirs to depth n



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