summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2025-01-04 18:31:56 +0000
committerGrégoire Duchêne <gduchene@awhk.org>2025-01-04 18:31:56 +0000
commit381e8aab7c28f0e58e26c80a7e67836a69ccd047 (patch)
tree82bf8082762149fe3398414d24a6538d6af598be
parent69aa6caf5a9a132b7c98f8e8c2ce8ea8738e99d8 (diff)
zsh: Add ${CARGO_HOME} to ${PATH}
-rw-r--r--zsh/env3
-rw-r--r--zsh/profile4
2 files changed, 5 insertions, 2 deletions
diff --git a/zsh/env b/zsh/env
index f6df33a..83e4f8b 100644
--- a/zsh/env
+++ b/zsh/env
@@ -24,3 +24,6 @@ esac
setopt EXTENDED_GLOB
source_if_exists zsh/env
+
+export CARGO_HOME=${XDG_DATA_HOME}/cargo
+export RUSTUP_HOME=${XDG_DATA_HOME}/rustup
diff --git a/zsh/profile b/zsh/profile
index 7c70bb4..66ceab0 100644
--- a/zsh/profile
+++ b/zsh/profile
@@ -2,8 +2,8 @@
() {
local dir
- for dir in ~/{.local/bin,bin} ${GOPATH:-~/go}/bin; do
- [[ -d ${dir} ]] && path=(${dir} ${path})
+ for dir in ~/.local ${CARGO_HOME} ${GOPATH}; do
+ [[ -d ${dir}/bin ]] && path=(${dir}/bin ${path})
done
}