From 4d67460a994e81a8768e89346547abbea1f5e52f Mon Sep 17 00:00:00 2001 From: Eric Turner Date: Sat, 2 Aug 2025 20:21:41 -0600 Subject: [PATCH] feat: add bash shell configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add .bashrc with custom bash settings - Add .bash_profile for login shell configuration - Add .bash_aliases for bash-specific aliases 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- bash/.bash_aliases | 2 ++ bash/.bash_profile | 8 +++++++ bash/.bashrc | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 bash/.bash_aliases create mode 100644 bash/.bash_profile create mode 100644 bash/.bashrc diff --git a/bash/.bash_aliases b/bash/.bash_aliases new file mode 100644 index 0000000..e7ea9f6 --- /dev/null +++ b/bash/.bash_aliases @@ -0,0 +1,2 @@ +# Bash-specific aliases +# Add bash-only aliases here if needed \ No newline at end of file diff --git a/bash/.bash_profile b/bash/.bash_profile new file mode 100644 index 0000000..ed7863f --- /dev/null +++ b/bash/.bash_profile @@ -0,0 +1,8 @@ +# Bash Profile Configuration + +# Source .bashrc if it exists +if [ -f ~/.bashrc ]; then + source ~/.bashrc +fi + +# Add any login-specific configurations here \ No newline at end of file diff --git a/bash/.bashrc b/bash/.bashrc new file mode 100644 index 0000000..f59dae2 --- /dev/null +++ b/bash/.bashrc @@ -0,0 +1,58 @@ +# Bash Configuration + +# Source shared configurations +if [ -f ~/.dotfiles/shared/exports ]; then + source ~/.dotfiles/shared/exports +fi + +if [ -f ~/.dotfiles/shared/aliases ]; then + source ~/.dotfiles/shared/aliases +fi + +if [ -f ~/.dotfiles/shared/functions ]; then + source ~/.dotfiles/shared/functions +fi + +if [ -f ~/.dotfiles/shared/sync ]; then + source ~/.dotfiles/shared/sync +fi + +if [ -f ~/.dotfiles/shared/completions ]; then + source ~/.dotfiles/shared/completions +fi + +if [ -f ~/.dotfiles/shared/prompt ]; then + source ~/.dotfiles/shared/prompt +fi + +# Bash-specific settings +shopt -s histappend +shopt -s checkwinsize +shopt -s cdspell +shopt -s dirspell +shopt -s nocaseglob + +# History settings +HISTCONTROL=ignoreboth:erasedups +HISTIGNORE="ls:cd:cd -:pwd:exit:date:* --help" + +# Bash completion +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +# Bash-specific prompt +if [[ -n $(git_branch 2>/dev/null) ]]; then + PS1="\[${CYAN}\]\u@\h\[${RESET}\]:\[${BLUE}\]\w\[${RESET}\] \[${GREEN}\](\$(git_branch))\[${RED}\]\$(git_status)\[${RESET}\]\$ " +else + PS1="\[${CYAN}\]\u@\h\[${RESET}\]:\[${BLUE}\]\w\[${RESET}\]\$ " +fi + +# Source bash-specific aliases if they exist +if [ -f ~/.dotfiles/bash/.bash_aliases ]; then + source ~/.dotfiles/bash/.bash_aliases +fi \ No newline at end of file