getTagSha() {
local repo="$1"
if [ -z "$repo" ]; then
echo "usage: fzf_git_tag_sha <git_repo_url>" >&2
return 1
fi
git ls-remote --tags "$repo" \
| fzf \
| awk '{print $1}'
}
getTagSha https://github.com/actions/checkout.gitfunction getTagSha {
param(
[Parameter(Mandatory = $true)]
[string]$Repo
)
git ls-remote --tags $Repo `
| fzf `
| ForEach-Object {
($_ -split '\s+')[0]
}
}getTagSha https://github.com/actions/checkout.git