dotfiles/bash/tamakirc
Nikurasu 29c2dbcb86
feat(bash): custom git init
Wrapper arround git that executes a customized git init that asks for a username and email
2024-05-10 09:47:45 +02:00

58 lines
1.8 KiB
Plaintext

export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
export VOLTA_HOME="$HOME/.volta"
export PATH="$PATH:$VOLTA_HOME/bin"
export PATH="$PATH:$HOME/.local/bin"
export PATH="$PATH:$HOME/.cargo/bin"
export PATH="$PATH:$HOME/.local/share/bob/nvim-bin"
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PATH:$PYENV_ROOT/bin"
export PATH=$PATH:/home/tamaki/.spicetify
export BUN_INSTALL="$HOME/.bun"
export PATH=$BUN_INSTALL/bin:$PATH
export ZVM_INSTALL="$HOME/.zvm/self"
export PATH="$PATH:$HOME/.zvm/bin"
export PATH="$PATH:$ZVM_INSTALL/"
export PATH=$PATH:/home/jonas-psotka/.spicetify
eval "$(pyenv init -)"
eval "$(starship init bash)"
eval "$(zoxide init bash)"
if command -v eza &> /dev/null && [ -f "$HOME/Documents/coding/dotfiles/shell/alias/eza" ]; then
. $HOME/Documents/coding/dotfiles/shell/alias/eza
fi
if [ -f "$HOME/Documents/coding/dotfiles/shell/alias/alias" ]; then
. $HOME/Documents/coding/dotfiles/shell/alias/alias
fi
. "$HOME/.cargo/env"
function tp {
if [ -d $1 ]
then
if ! gum confirm "$(basename $1) is directory! Do you really want to delete it?"
then
exit 1
fi
fi
mv $(realpath $1) $HOME/.local/share/Trash/files/
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
}