Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Entries under the **Removed** section indicate items removed from the entire doc

## Unreleased

## 2025-12-11

### Changed

- changed(zshrc): refactor PATH and implement removal of dups in PATH

## 2025-09-30

### Changed
Expand Down
17 changes: 10 additions & 7 deletions includes/zshrc-files/zshrc-linux.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,18 @@ Ctrl + O - Allows you to copy what you are currently typing, via 'Ctrl' + 'O'.'"
# 1Password auth socket.
export SSH_AUTH_SOCK="$HOME/.1password/agent.sock"

orig_path="$PATH"
## Path purpose:
## - $HOME/.local/bin:User installed binaries.
## - $HOME/.dotnet/tools: .NET Core tools.
## - $HOME/.local/share/gem/ruby/3.3.0/bin: Ruby gems.
## - $HOME/.local/bin: Local binaries installed by the user.
## - $HOME/.dotnet/tools: Local .NET Core tools.
## - /opt/nvim/bin: Neovim binary.
export PATH="$HOME/.local/bin:$PATH"
[[ -d $HOME/.dotnet/tools ]] && export PATH="$HOME/.dotnet/tools:$PATH"
[[ -d $HOME/.local/share/gem/ruby/3.3.0/bin ]] && export PATH="$HOME/.local/share/gem/ruby/3.3.0/bin:$PATH"
[[ -d /opt/nvim/bin ]] && export PATH="/opt/nvim/bin:$PATH"
new_path="$HOME/.local/bin"
[[ -d /opt/nvim/bin ]] && new_path="$new_path:/opt/nvim/bin"
[[ -d $HOME/.dotnet/tools ]] && new_path="$new_path:$HOME/.dotnet/tools"
PATH="$new_path:$orig_path"
typeset -U path # Ensure all dirs in PATH are unique, preserving the first occurrence.
export PATH
unset orig_path new_path

# Modifies the colors of files and directories in the terminal.
export LS_COLORS="di=34:ln=36:so=35:pi=1;33:ex=32:bd=34;46:cd=1;33;40:su=30;41:sg=30;46:tw=30;42:ow=30;1;43"
Expand Down
20 changes: 14 additions & 6 deletions includes/zshrc-files/zshrc-macos.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,20 @@ Ctrl + O - Allows you to copy what you are currently typing, via 'Ctrl' + 'O'.'"
export SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"

hb_prefix="$(brew --prefix 2>/dev/null || echo "/opt/homebrew")"
# Path purpose:
# - $hb_prefix/opt/trash-cli/bin: Homebrew installed trash-cli binary.
# - $HOME/.local/bin: User installed binaries.
# - $HOME/.cargo/bin: Rust installed binaries.
export PATH="$hb_prefix/opt/trash-cli/bin:$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
unset hb_prefix
orig_path="$PATH"
## Path purpose:
## - $HOME/.local/bin: User installed binaries.
## - $HOME/.cargo/bin: Rust installed binaries.
## - $hb_prefix/bin: Homebrew installed user binaries.
## - $hb_prefix/sbin: Homebrew installed system binaries.
## - $hb_prefix/opt/trash-cli/bin: Homebrew installed trash-cli binary.
new_path="$HOME/.local/bin:$HOME/.cargo/bin"
new_path="$new_path:$hb_prefix/bin:$hb_prefix/sbin"
new_path="$new_path:$hb_prefix/opt/trash-cli/bin"
PATH="$new_path:$orig_path"
typeset -U path # Ensure all dirs in PATH are unique, preserving the first occurrence.
export PATH
unset hb_prefix orig_path new_path

# Modifies the colors of files and directories when using `ls`.
export LSCOLORS="exgxfxDxcxegDaabagacaD"
Expand Down
2 changes: 1 addition & 1 deletion submodules/dotfiles