Fabric icon indicating copy to clipboard operation
Fabric copied to clipboard

[Feature request]: please add a search path for patterns

Open tmbdev opened this issue 1 year ago • 2 comments

What do you need?

Copying files into the ~/.config/fabric/patterns directory is kind of messy and doesn't work well with upgrades or dotfile maintenance scripts.

Why not add a search path for patterns as an environment variable, say FABRIC_PATTERN_DIRECTORY? By default, it could be ~/.config/fabric/custom_patterns:~/.config/fabric/patterns, but users could set it to something else.

tmbdev avatar Sep 17 '24 14:09 tmbdev

I'd like to be able to never see the ones I'll never use.

Starfish-Fujieda avatar Sep 17 '24 22:09 Starfish-Fujieda

Solid idea. I suggest calling it FABRIC_PATTERN_PATH and make it work like OS PATH does, just keep concatenating new branches in the order of priority.

mattjoyce avatar Oct 10 '24 10:10 mattjoyce

@mattjoyce @Starfish-Fujieda @tmbdev - I'm adding a custom patterns directory feature—while not exactly a search path for patterns, it does eliminate the janky way we've been recommending adding custom patterns.

In setup, here is what it looks like:


Tools

	[19]	Custom Patterns - Set directory for your custom patterns (optional)
	[20]	Default AI Vendor and Model [required] (configured)
[...]

[Plugin Number] Enter the number of the plugin to setup (leave empty to skip):
19

[Custom Patterns]

Enter the path to your custom patterns directory (leave empty to skip) (leave empty to skip):
~/src/custom-fabric/patterns

And then the pattern system looks there FIRST (allowing you to override and experiment with builtin patterns).

Let me know what you think.

ksylvan avatar Jul 06 '25 07:07 ksylvan

The custom directory support is in the latest fabric. I'm closing this issue.

ksylvan avatar Jul 06 '25 07:07 ksylvan