TagF

TagF sets the tag using a function.

carapace.ActionValues(
	"one.png",
	"two.gif",
	"three.txt",
	"four.md",
).StyleF(style.ForPathExt).TagF(func(s string) string {
	switch filepath.Ext(s) {
	case ".png", ".gif":
		return "images"
	case ".txt", ".md":
		return "documents"
	default:
		return ""
	}
})