Skip to content

basic fabric completions to pull available pattern names from config location

Notifications You must be signed in to change notification settings

diffficult/fabric-zsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🧵 Fabric ZSH Completions Module

This module provides ZSH completions for Fabric, an open-source framework for augmenting humans using AI.

🚀 Features

  • Tab completion for all Fabric commands and flags
  • Smart autocompletion for:
    • 📂 Pattern selection from your local patterns directory
    • 🤖 AI model selection with provider information
    • 🌐 Language code selection with descriptions
    • 🎥 YouTube URL template completion
  • Cached model listings for improved performance
  • Support for both short (-p) and long (--pattern) flag formats

⚡ Installation

Prerequisites

  1. Prezto must be installed
  2. Fabric must be installed and accessible in your PATH

Setup Steps

  1. Clone this repository:
git clone https://github.com/diffficult/fabric-zsh.git
  1. Create the contrib directory in your Prezto installation if it doesn't exist:
mkdir -p ${ZDOTDIR:-$HOME}/.zprezto/contrib
  1. Symlink the module to your Prezto contrib directory:
ln -s /path/to/cloned/fabric-zsh ${ZDOTDIR:-$HOME}/.zprezto/contrib/fabric
  1. Add 'fabric' to your modules list in .zpreztorc:
# Find the modules section and add 'fabric' to the list
zstyle ':prezto:load' pmodule \
  'environment' \
  'terminal' \
  'editor' \
  'history' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'prompt' \
  'fabric'  # Add this line
  1. Restart your shell or reload your configuration:
source ${ZDOTDIR:-$HOME}/.zpreztorc

🎮 Usage

After installation, you can use tab completion with Fabric commands:

  • fabric [TAB] - Show all available flags
  • fabric -y [TAB] - Get YouTube URL template
  • fabric -p [TAB] - List available patterns
  • fabric -m [TAB] - List available AI models
  • fabric -g [TAB] - List available language codes

🔄 Updates

To update the module, pull the latest changes from the repository:

cd /path/to/cloned/fabric-zsh
git pull

Your symlinked module will automatically reflect the updates.

🤝 Contributing

Feel free to submit issues and enhancement requests! Please check for existing issues before submitting new ones.

📜 License

MIT License - See LICENSE file for details

👏 Acknowledgments


Made with ❤️ by the Fabric community

About

basic fabric completions to pull available pattern names from config location

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages