1
0
Fork 0

.zsh_aliases: add temporary workaround to fix _rust-analyzer_ not being in HOME/.cargo/bin

This commit is contained in:
Pratham Patel 2022-09-24 22:56:41 +05:30
parent 293f338405
commit 46773e6a28
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,13 @@ export TIMEFMT=$'\nJob\t%J\n\nCPU\t%P\nuser\t%U\nsystem\t%S\ntotal\t%E'
[[ -d "$HOME/.cargo/bin" ]] && export PATH=$HOME/.cargo/bin:$PATH
[[ -d "$HOME/.local/bin" ]] && export PATH=$HOME/.local/bin:$PATH
[[ -d "/usr/local/sbin" ]] && export PATH=/usr/local/sbin:$PATH
if command -v rustup > /dev/null; then
RUSTUP_TRIPLET=$(rustup show active-toolchain | awk '{print $1}')
RUSTUP_PATH="$HOME/.rustup/toolchains/$RUSTUP_TRIPLET/bin"
[[ -d "$RUSTUP_PATH" ]] && export PATH=$RUSTUP_PATH:$PATH
# rust-analyzer is in $RUSTUP_PATH instead of $HOME/.cargo/bin
# :(
fi
typeset -U PATH
# common aliases