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

Re: PATCH: dynamic directory name completion



On 12 June 2010 00:18, Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> I've been playing around with dynamic directory names for referring to
> recently used directories and in the process realised that rather than
> having to overload _dynamic_directory_name in order to complete dynamic
> directory names it would be much more natural to call the original
> function, zsh_directory_name, with a new code letter.  You don't lose
> anything at all by this---you can still overload _dynamic_directory_name
> if you prefer.
>
> Here's the change with a tested (but rather less useful than the code
> I'm aiming at) example.
>
> Index: Doc/Zsh/expn.yo
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Doc/Zsh/expn.yo,v
> retrieving revision 1.115
> diff -p -u -r1.115 expn.yo
> --- Doc/Zsh/expn.yo     11 Jun 2010 20:08:02 -0000      1.115
> +++ Doc/Zsh/expn.yo     11 Jun 2010 22:12:37 -0000
> @@ -1451,6 +1451,12 @@ parts of the directory path, as describe
>  length matched (16 in the example) is longer than that matched by any
>  static name.
>
> +The completion system calls `tt(zsh_directory_name c)' in order to
> +completion dynamic names for directories.  The code for this should be

completion -> complete



Messages sorted by: Reverse Date, Date, Thread, Author