# Fish Repotool Plugin A Fish shell plugin for the repotool repository management system. ## Installation ### Using Fisher ```fish fisher install path/to/fish-repotool ``` ### Manual Installation 1. Copy the `conf.d/repotool.fish` file to your fish config directory: ```fish cp conf.d/repotool.fish ~/.config/fish/conf.d/ ``` 2. Copy the `functions/repotool.fish` file to your fish functions directory: ```fish cp functions/repotool.fish ~/.config/fish/functions/ ``` ## Configuration Set the `REPOTOOL_PATH` environment variable to specify where your repositories are stored: ```fish set -gx REPOTOOL_PATH "$HOME/my-repos" ``` If not set, it defaults to `$HOME/repo`. ## Usage The plugin provides a `repo` alias that sources the repotool function with the following commands: - `repo get ` - Clone a repository if not found - `repo worktree list` - List existing worktrees - `repo worktree get ` - Create or go to a worktree - `repo worktree root` - Return to the root directory - `repo worktree remove ` - Remove a worktree - `repo open` - Open the current repository in web browser ## Hooks The plugin supports hooks that can be placed in `$REPOTOOL_PATH/.hooks/`: - `before__cd.fish` - Executed before changing directory - `after__cd.fish` - Executed after changing directory Hooks can also have `.sh` extension or no extension at all. ## Requirements - Fish shell 4.0 or later - `jq` for JSON parsing - The repotool binary installed at `$REPOTOOL_PATH/.bin/repotool`