diff --git a/bashrc/termux b/bashrc/termux index 7f83f9d..e7ec1dc 100755 --- a/bashrc/termux +++ b/bashrc/termux @@ -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 diff --git a/bashrc/worthwhile-functions b/bashrc/worthwhile-functions index a3ac7b2..37bffa5 100644 --- a/bashrc/worthwhile-functions +++ b/bashrc/worthwhile-functions @@ -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 +}