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

Re: Completing arguments containing the colon character

Gabor Maghera wrote on Fri, Oct 28, 2011 at 16:12:05 -0700:
> We use a naming standard for Perforce specs of the form
> "<username>::<arbitrary>".  Zsh autocompletion cannot process these entries,
> due to the colon character being used as a list separator by its mechanism
> (as I understand).
> Is there a way to make it work?  I've been perusing the man page for
> zcompsys, as well as the _perforce completion module, but I'm not sure it's
> possible.
> Here is an example of what the erroneous completions look like:
> % p4 client -o p4droid<tab><tab>
> p4droid                                          --
> :PerforceTriggers:2009/12/29 root /opt/local/perforce/trigger_scripts
> 'Created by p4droid. '
> p4droid                                          -- :triggers:2009/12/18
> root /Workspace/trigger_test 'Created by gabor.maghera. '
> The full entry names are p4droid::PerforceTriggers and p4doird::triggers.

So I assumed you'd like 
% p4 client -o p4droid<tab>
to suggest 'p4droid::PerforceTriggers' and 'p4doird::triggers'?

I don't know how to do that, but it's definitely possible:

% perldoc File::<tab>
File::Basename         File::DosGlob          File::Listing          File::Spec::Functions  File::Spec::Win32    
File::CheckTree        File::Fetch            File::Path             File::Spec::Mac        File::stat           
File::Compare          File::Find             File::Spec             File::Spec::OS2        File::Temp           
File::Copy             File::Glob             File::Spec::Cygwin     File::Spec::Unix                            
File::Copy::Recursive  File::GlobMapper       File::Spec::Epoc       File::Spec::VMS                             

> Thanks in advance,
> Gabor



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