A zsh function that provides fuzzy directory navigation for Terraform projects within a git repository.
tfj (Terraform Fuzzy Jump) allows you to quickly navigate to Terraform directories in your git repository using fuzzy search. It searches for directories containing .terraform/terraform.tfstate files and presents them in an interactive fuzzy finder interface.
- Automatically detects Terraform directories by looking for
.terraform/terraform.tfstatefiles - Uses fuzzy search for quick directory selection
- Works from any subdirectory within a git repository
This function requires the following external commands:
git- For detecting the repository rootrg(ripgrep) - For fast file searchingfzf- For fuzzy selection interface
- Clone this repository or download the
tfj.zshfile - Source the file in your
.zshrc:
source /path/to/tfj.zshAdd the following to your .zshrc:
zinit light shmokmt/tfjtfj