diff --git a/bash/tamakirc b/bash/tamakirc index 6a61875..a2aef61 100644 --- a/bash/tamakirc +++ b/bash/tamakirc @@ -41,3 +41,17 @@ function tp { echo -e "[Trash Info]\nPath=$(realpath $1)\nDeletionDate=$(date "+%Y-%m-%dT%H:%M:%S")" > $HOME/.local/share/Trash/info/$(basename $1).trashinfo gum style --bold --border rounded --border-foreground "#F5A9B8" --foreground "#5BCEFA" "$(basename $1) has been thrown in the bin" } + +git() { + if [[ $1 == "init" ]]; then + shift + gituser=$(gum input --prompt "Git user for new repo: " --placeholder "user") + gitemail=$(gum input --prompt "Git email for new repo: " --placeholder "email") + command git init "$@" + command git config user.name $gituser + command git config user.email $gitemail + + else + command git "$@" + fi +}