1
0
Fork 0
mirror of https://gitlab.com/mlunax/dotfiles.git synced 2025-04-19 08:45:36 +00:00

Update path and rtx scripts to use local bin folder

This commit is contained in:
Luna 2023-06-05 18:46:54 +02:00
parent 53ea70566c
commit 3bcb5ded4e
3 changed files with 33 additions and 34 deletions

View file

@ -8,5 +8,5 @@ grep -q 'npm' <<< $devTools && export PATH="$PATH:$HOME/.local/npm/bin"
grep -q 'GO' <<< $devTools && export PATH="$PATH:$(go env GOPATH)/bin" grep -q 'GO' <<< $devTools && export PATH="$PATH:$(go env GOPATH)/bin"
grep -q 'android' <<< $devTools && export ANDROID_SDK_ROOT="$HOME/.android-sdk" grep -q 'android' <<< $devTools && export ANDROID_SDK_ROOT="$HOME/.android-sdk"
grep -q 'pulumi' <<< $devTools && export PATH="$PATH:$HOME/.pulumi/bin" grep -q 'pulumi' <<< $devTools && export PATH="$PATH:$HOME/.pulumi/bin"
[ -n $GOPATH ] && export PATH="$GOPATH/bin:$PATH" #[ -n $GOPATH ] && export PATH="$GOPATH/bin:$PATH"
export PATH="$PATH:$HOME/.local/bin" export PATH="$HOME/.local/bin:$PATH"

View file

@ -1,4 +1,4 @@
if test -f "$HOME/.pyenv/bin/pyenv"; then if [[ -d "$HOME/.pyenv/" ]]; then
export PYENV_ROOT="$HOME/.pyenv" export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)" eval "$(pyenv init -)"

View file

@ -1,8 +1,7 @@
export RTX_SHELL=zsh export RTX_SHELL=zsh
if iscmd rtx; then if iscmd rtx; then
rtx() {
rtx() {
local command local command
command="${1:-}" command="${1:-}"
if [ "$#" = 0 ]; then if [ "$#" = 0 ]; then
@ -19,19 +18,19 @@ rtx() {
command $HOME/.cargo/bin/rtx "$command" "$@" command $HOME/.cargo/bin/rtx "$command" "$@"
;; ;;
esac esac
} }
_rtx_hook() { _rtx_hook() {
trap -- '' SIGINT; trap -- '' SIGINT;
eval "$("$HOME/.cargo/bin/rtx" hook-env -s zsh)"; eval "$("$HOME/.cargo/bin/rtx" hook-env -s zsh)";
trap - SIGINT; trap - SIGINT;
} }
typeset -ag precmd_functions; typeset -ag precmd_functions;
if [[ -z "${precmd_functions[(r)_rtx_hook]+1}" ]]; then if [[ -z "${precmd_functions[(r)_rtx_hook]+1}" ]]; then
precmd_functions=( _rtx_hook ${precmd_functions[@]} ) precmd_functions=( _rtx_hook ${precmd_functions[@]} )
fi fi
typeset -ag chpwd_functions; typeset -ag chpwd_functions;
if [[ -z "${chpwd_functions[(r)_rtx_hook]+1}" ]]; then if [[ -z "${chpwd_functions[(r)_rtx_hook]+1}" ]]; then
chpwd_functions=( _rtx_hook ${chpwd_functions[@]} ) chpwd_functions=( _rtx_hook ${chpwd_functions[@]} )
fi fi
fi fi