Skip to content

Commit

Permalink
fix: zsh path and completions functionalities
Browse files Browse the repository at this point in the history
The changes in this commit are:

- Homebrew functionalities like auto-completion
- Unified `XDG_DATA_HOME` and `XDG_CONFIG_HOME` paths
- Add Golang binaries path
- Remove OMZP:tmux plugin
  • Loading branch information
jeffreytse committed Aug 2, 2024
1 parent 987fc56 commit 74c50cb
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ zinit snippet OMZP::docker-compose
zinit snippet OMZP::history
zinit snippet OMZP::textmate
zinit snippet OMZP::lighthouse
zinit snippet OMZP::tmux
zinit snippet OMZP::fancy-ctrl-z
zinit snippet OMZP::common-aliases

Expand Down Expand Up @@ -174,7 +173,11 @@ zinit light jeffreytse/zsh-vi-mode
#############################

# Functions Autoloading
fpath=(~/.zsh $fpath)

# Homebrew functionalities like auto-completion
if type brew &>/dev/null; then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi

# Completion
autoload -U promptinit && promptinit
Expand Down Expand Up @@ -211,6 +214,10 @@ export LANG=en_US.UTF-8
# ssh
# export SSH_KEY_PATH="~/.ssh/rsa_id"

# unified XDG_DATA_HOME and XDG_CONFIG_HOME
export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"}
export XDG_CONFIG_HOME=${XDG_DATA_HOME:="$HOME/.config"}

# asdf-vm
source $HOME/.asdf/asdf.sh
fpath=(${ASDF_DIR}/completions $fpath)
Expand All @@ -229,6 +236,9 @@ export PATH="$PATH:$(asdf where php)/.composer/vendor/bin"
# python bin
export PATH="$PATH:$(asdf where python)/bin"

# golang bin
export PATH="$PATH:$(asdf where golang)/packages/bin"

# dotnet bin
export PATH="$PATH:$(asdf where dotnet-core)"

Expand All @@ -245,7 +255,7 @@ export PATH="$PATH:$HOME/.local/bin"
export JAVA_HOME="$(asdf where java)"

# pnpm
export PNPM_HOME="$HOME/.local/share/pnpm"
export PNPM_HOME="$XDG_DATA_HOME/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
Expand Down

0 comments on commit 74c50cb

Please sign in to comment.