Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [Pkg-zsh-devel] Bug#679824: zsh: Buggy perl completion with -e [origin: vincent@xxxxxxxxxx]
On Jul 3, 5:11pm, Peter Stephenson wrote:
}
} Probably the best compromise in general would be to have .pl, .py, .rb
} and other files completed using separate tags, so you have the easily
} configurable option of picking out the native suffix or all files.
}
} I've a vague memory you can already tell _files to do clever things like
} that in certain contexts but I'm too lazy to check.
One can use the file-patterns style to create separate tag groups.
The file-patterns style provides alternatives to the default tags,
which are not used. Its value consists of elements of the form
`PATTERN:TAG'; each string may contain any number of such
specifications separated by spaces.
[...]
For example, to make the rm command first complete only names of
object files and then the names of all files if there is no
matching object file:
zstyle ':completion:*:*:rm:*' file-patterns \
'*.o:object-files' '%p:all-files'
It is often a bit tricky to get completion to actually *omit* the files in
one of the groups rather than merely reorder them.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author