[metadata]
name = "git-repos"
requirements = ["fd", "git"]
description = """
A channel to select from git repositories on your local machine.

This channel uses `fd` to find directories that contain a `.git` subdirectory, and then allows you to preview the git log of the selected repository.
"""

[source]
# this is a macos version of the command. While perfectly usable on linux, you may want to tweak it a bit.
command = "fd -g .git -HL -t d -d 10 --prune ~ -E 'Library' -E 'Application Support' --exec dirname '{}'"
display = "{split:/:-1}"

[preview]
command = "cd '{}'; git log -n 200 --pretty=medium --all --graph --color"
