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

Re: completion of filenames



On Tue, 2019-12-10 at 08:59 -0800, Ray Andrews wrote:
> On 2019-12-10 8:30 a.m., Peter Stephenson wrote:
> > 
> > 
> > Suffix aliases are already handled.  So if it's a file in the current directory,
> > you should find typing ./<tab> completes files with a suffix alias defined.
> > 
> > pws
> > 
> Doesn't work.  This could be something I've botched up myself.

Try ^x h and you should see something like (warning: these are long
lines I've not attempted to wrap myself so anything could happen):

tags in context :completion::complete:-command-::
    commands executables builtins functions aliases suffix-aliases reserved-words jobs parameters parameters  (_command_names _autocd) 
    commands                                                                                                  (_path_commands _command_names _autocd) 
    globbed-files                                                                                             (_files _command_names _autocd)                  
    directories                                                                                               (_files _command_names _autocd) 
    all-files                                                                                                 (_files _command_names _autocd) 
    jobs                                                                                                      (_jobs _command_names _autocd) 
    parameters                                                                                                (_parameters _command_names _autocd)

The "suffix-aliases" is obviously relevant here.  As you can see it's
handled by _command_names.  (Well, OK, it might be handled by _autocd
but it isn't.)  If you look in there you'll see it's calling
_suffix_alias_files.  I don't see any obvious styles to get in the way.

pws




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