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

filename completions with prefixes



I am trying to write a completion function for a command called pdbset in which *.pdb files are completed with the prefixes 'XYZIN' and 'XYZOUT'. Below is an example:

pdbset XYZIN input.pdb XYZOUT output.pdb

So far I have,

local expl
_description files expl 'pdb files'
_path_files "$expl[@]" -g '*.pdb' || _path_files "$expl[@]" -/ -g '*.pdb'

I am having trouble inserting the prefixes.
Help is greatly appreciated.

Wataru Kagawa



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