Skip to content

Commit 18eea7d

Browse files
Refactor Zsh and Bash configuration files to streamline Homebrew environment initialization. Added Homebrew sourcing to .zshrc and .bashrc files, while removing redundant sourcing from .zprofile. Improved consistency across shell environments.
1 parent c809d33 commit 18eea7d

6 files changed

Lines changed: 16 additions & 9 deletions

File tree

common/zsh/.zprofile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
#!/bin/zsh
2-
3-
source ~/.profile

common/zsh/.zshrc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/zsh
22

3+
source "$HOME/.profile"
4+
35
# --------------- Interactive Shell Settings ---------------
46

57
# Enable the subsequent settings only in interactive sessions
@@ -117,11 +119,6 @@ plugins=(
117119
zoxide
118120
)
119121

120-
# Homebrew (Linuxbrew) environment
121-
if [[ -x /home/linuxbrew/.linuxbrew/bin/brew ]]; then
122-
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
123-
fi
124-
125122
# Host-specific interactive config (plugins, fpath filters, etc.)
126123
if [[ -r "$HOME/.config/zsh/.zshrc" ]]; then
127124
source "$HOME/.config/zsh/.zshrc"

lab-ubuntu/bash/.config/bash/.bashrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# Homebrew (Linuxbrew) environment
4+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
5+
36
# >>> conda initialize >>>
47
# !! Contents within this block are managed by 'conda init' !!
58
__conda_setup="$('/apps/miniconda3/bin/conda' 'shell.bash' 'hook' 2>/dev/null)"

lab-ubuntu/zsh/.config/zsh/.zshrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/zsh
22

3+
# Homebrew (Linuxbrew) environment
4+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
5+
36
# >>> conda initialize >>>
47
# !! Contents within this block are managed by 'conda init' !!
58
__conda_setup="$('/apps/miniconda3/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)"
@@ -30,7 +33,7 @@ unset __mamba_setup
3033

3134
# set variable identifying the chroot you work in (used in the prompt below)
3235
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
33-
debian_chroot=$(cat /etc/debian_chroot)
36+
debian_chroot=$(cat /etc/debian_chroot)
3437
fi
3538

3639
typeset -ga plugins

wsl-ubuntu/bash/.config/bash/.bashrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
# Homebrew (Linuxbrew) environment
4+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
5+
36
# >>> conda initialize >>>
47
# !! Contents within this block are managed by 'conda init' !!
58
__conda_setup="$('/home/fridrichmethod/miniconda3/bin/conda' 'shell.bash' 'hook' 2>/dev/null)"

wsl-ubuntu/zsh/.config/zsh/.zshrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/zsh
22

3+
# Homebrew (Linuxbrew) environment
4+
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
5+
36
# >>> conda initialize >>>
47
# !! Contents within this block are managed by 'conda init' !!
58
__conda_setup="$('/home/fridrichmethod/miniconda3/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)"
@@ -30,7 +33,7 @@ unset __mamba_setup
3033

3134
# set variable identifying the chroot you work in (used in the prompt below)
3235
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
33-
debian_chroot=$(cat /etc/debian_chroot)
36+
debian_chroot=$(cat /etc/debian_chroot)
3437
fi
3538

3639
typeset -ga plugins

0 commit comments

Comments
 (0)