Something went wrong. Try again.
Something went wrong. Try again.
12345678910111213141516#!/usr/bin/env bash
IDENTITIES=$(git config --global --name-only --get-regexp "user.*..name" | sed -e 's/^user.//' -e 's/.name$//')ID=$(echo "${IDENTITIES}" | fzf -e -1 +m -q "$1")if ! git config --global --get-regexp "user.${ID}.name" > /dev/null; then echo "Please use a valid git identityOptions:" git config --global --name-only --get-regexp "user.*..name" | sed -e 's/^user.//' -e 's/.name$//' -e 's/^/\t/' exit 1figit config user.name "$(git config user.${ID}.name)"git config user.email "$(git config user.${ID}.email)"
echo "Name: $(git config user.name)"echo "Email: $(git config user.email)"