# Load bash completion
if [[ -f /etc/bash_completion ]]; then
    . /etc/bash_completion
fi

# Custom aliases
alias python="python3"
alias grep="grep --color=auto"

alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."

if [[ -f "$HOME/.local/bin/scripts/check_aliases" ]]; then
    . "$HOME/.local/bin/scripts/check_aliases"
fi

# Set the default editor
export EDITOR='nvim'

# Add eza completions to BASH_COMPLETION if not already included
if [[ ! "$BASH_COMPLETION" =~ (^|:)${HOME}/.local/bin/eza/completions/bash(:|$) ]]; then
    export BASH_COMPLETION="$HOME/.local/bin/eza/completions/bash:$BASH_COMPLETION"
fi

# Initialize zoxide
if command -v zoxide &>/dev/null; then
    eval "$(zoxide init bash)"
fi

# Initialize Starship
if command -v starship &>/dev/null; then
    eval "$(starship init bash)"
fi
