feat(bash): custom git init
Wrapper arround git that executes a customized git init that asks for a username and email
This commit is contained in:
parent
99a4e18666
commit
29c2dbcb86
1 changed files with 14 additions and 0 deletions
|
@ -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
|
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"
|
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
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue