From df5560c38b8e0e0eb18e99ce0a56f848a00eb105 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 16 Jun 2025 12:37:30 +0200 Subject: [PATCH] Ask for identification --- install/3-config.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/install/3-config.sh b/install/3-config.sh index 4d9202a..9a82706 100644 --- a/install/3-config.sh +++ b/install/3-config.sh @@ -22,3 +22,25 @@ git config --global alias.br branch git config --global alias.ci commit git config --global alias.st status git config --global pull.rebase true + +# Configure identification +echo "Enter identification for git and autocomplete..." +export OMAKUB_USER_NAME=$(gum input --placeholder "Enter full name" --prompt "Name> ") +export OMAKUB_USER_EMAIL=$(gum input --placeholder "Enter email address" --prompt "Email> ") + +# Set identification from install inputs +if [[ -n "${OMAKUB_USER_NAME//[[:space:]]/}" ]]; then + git config --global user.name "$OMAKUB_USER_NAME" +fi + +if [[ -n "${OMAKUB_USER_EMAIL//[[:space:]]/}" ]]; then + git config --global user.email "$OMAKUB_USER_EMAIL" +fi + +tee ~/.XCompose >/dev/null < : "$OMAKUB_USER_NAME" + : "$OMAKUB_USER_EMAIL" +EOF