bashrc: Updated stuff KEK

Signed-off-by: Andrei Jiroh Eugenio Halili <andreijiroh@madebythepins.tk>
This commit is contained in:
Andrei Jiroh Eugenio Halili 2021-04-25 16:02:26 +08:00
parent c1aebf7107
commit 6839317cfc
Signed by: ajhalili2006
GPG Key ID: A30EBE40AD856D88
2 changed files with 27 additions and 0 deletions

View File

@ -26,3 +26,21 @@ export DOTFILES_HOME=$HOME/.dotfiles
# then do chain sourcing
source ~/.dotfiles/bashrc/chain-source
# check if thefuck Python3 package is there
TF_PYTHON_PATH=$(command -v thefuck)
if [[ $TF_PYTHON_PATH != "" ]];then
eval $(thefuck --alias fuckwit)>>/dev/null
eval $(thefuck --alias what-the-fuck)>>/dev/null
eval $(thefuck --alias holy-shit)>>/dev/null
eval $(thefuck --alias stfu)>>/dev/null
fi
# Export my Cloudflare API keys
source ~/.dotfiles/secrets/cloudflare.api-keys
# do console cleanup
clear
# then have termux-chroot
termux-chroot

View File

@ -27,3 +27,12 @@ refresh-funcs() {
refresh-aliases() {
source $HOME/.dotfiles/bashrc/aliases
}
# https://commentedcode.org/blog/2020/09/21/changing-default-branch-of-git-init/
function git() {
command git "$@"
if [[ $? -eq 0 && "$1" == "init" && "$@" != *"--help"* ]]; then
echo "Setting HEAD to branch main"
git symbolic-ref HEAD refs/heads/main
fi
}