Fabric icon indicating copy to clipboard operation
Fabric copied to clipboard

[Bug]: list patterns it not listing all patterns from the patterns folder

Open teapczynski opened this issue 1 year ago • 5 comments
trafficstars

What happened?

I just updated fabric with git pull and when running fabric --list it is not listing all the patterns. ~/fabric/patterns $ ll -1 | wc -l 112

~/fabric/patterns $ fabric --list | wc -l 109

Version check

  • [X] Yes I was.

Relevant log output

No response

Relevant screenshots (optional)

No response

teapczynski avatar Jun 04 '24 17:06 teapczynski

I had the same issue. The fabric -l command looks in the config directory:

    config = os.path.join(home_holder, ".config", "fabric")
    config_patterns_directory = os.path.join(config, "patterns")
    ...
    if args.list:
        try:
            direct = sorted(os.listdir(config_patterns_directory))
            for d in direct:
                print(d)
            sys.exit()
        except FileNotFoundError:
            print("No patterns found")
            sys.exit()

and where config_patterns_directory is actually in ~/.config/fabric/patterns. So you should copy the pattern from your custom pattern directory into your config for fabric, not into the project directory.

blakesims avatar Jun 05 '24 08:06 blakesims

Hey, my issue seems related as well - I just create personal */patterns/{my_pattern_folder}/system.md. when I check it with ls fabric/patterns | grep {my_pattern_folder} it does found it However whenever I use fabric -l | grep {my_pattern_folder} it doesn't find it.

In addition I add it manually to ~/.config/fabric/patterns as well (however for some reason I'm not sure this is the right way to insert it there. is there a unique way to add new patterns that we're missing?

CyRamos avatar Jun 05 '24 14:06 CyRamos

Hey, my issue seems related as well - I just create personal */patterns/{my_pattern_folder}/system.md. when I check it with ls fabric/patterns | grep {my_pattern_folder} it does found it However whenever I use fabric -l | grep {my_pattern_folder} it doesn't find it.

Hi, you have to copy your pattern into the config, not the project directory. The patterns are fetched from ~/.config/fabric/patterns

blakesims avatar Jun 05 '24 14:06 blakesims

Hey, my issue seems related as well - I just create personal */patterns/{my_pattern_folder}/system.md. when I check it with ls fabric/patterns | grep {my_pattern_folder} it does found it However whenever I use fabric -l | grep {my_pattern_folder} it doesn't find it.

Hi, you have to copy your pattern into the config, not the project directory. The patterns are fetched from ~/.config/fabric/patterns

Hey Thank you @blakesims I did it as well (probably edited my last comment after you answered, but it doesn't work either)

image

Edit: Working.

CyRamos avatar Jun 05 '24 14:06 CyRamos

Alternativly you can put the patterns in the project folder and run fabric --setup which should get them intp the ~/.config/fabric/patterns and make them useable.

WielandF avatar Jun 10 '24 11:06 WielandF