diff --git a/.zsh/path.zsh b/.zsh/path.zsh index 0f2c779..6f330fa 100644 --- a/.zsh/path.zsh +++ b/.zsh/path.zsh @@ -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 'android' <<< $devTools && export ANDROID_SDK_ROOT="$HOME/.android-sdk" grep -q 'pulumi' <<< $devTools && export PATH="$PATH:$HOME/.pulumi/bin" -[ -n $GOPATH ] && export PATH="$GOPATH/bin:$PATH" -export PATH="$PATH:$HOME/.local/bin" \ No newline at end of file +#[ -n $GOPATH ] && export PATH="$GOPATH/bin:$PATH" +export PATH="$HOME/.local/bin:$PATH" \ No newline at end of file diff --git a/.zsh/pyenv.zsh b/.zsh/pyenv.zsh index 3242d69..16690ac 100644 --- a/.zsh/pyenv.zsh +++ b/.zsh/pyenv.zsh @@ -1,4 +1,4 @@ -if test -f "$HOME/.pyenv/bin/pyenv"; then +if [[ -d "$HOME/.pyenv/" ]]; then export PYENV_ROOT="$HOME/.pyenv" command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" diff --git a/.zsh/rtx.zsh b/.zsh/rtx.zsh index c54fde7..9ebac54 100644 --- a/.zsh/rtx.zsh +++ b/.zsh/rtx.zsh @@ -1,37 +1,36 @@ export RTX_SHELL=zsh if iscmd rtx; then + rtx() { + local command + command="${1:-}" + if [ "$#" = 0 ]; then + command $HOME/.cargo/bin/rtx + return + fi + shift -rtx() { - local command - command="${1:-}" - if [ "$#" = 0 ]; then - command $HOME/.cargo/bin/rtx - return + case "$command" in + deactivate|shell) + eval "$($HOME/.cargo/bin/rtx "$command" "$@")" + ;; + *) + command $HOME/.cargo/bin/rtx "$command" "$@" + ;; + esac + } + + _rtx_hook() { + trap -- '' SIGINT; + eval "$("$HOME/.cargo/bin/rtx" hook-env -s zsh)"; + trap - SIGINT; + } + typeset -ag precmd_functions; + if [[ -z "${precmd_functions[(r)_rtx_hook]+1}" ]]; then + precmd_functions=( _rtx_hook ${precmd_functions[@]} ) + fi + typeset -ag chpwd_functions; + if [[ -z "${chpwd_functions[(r)_rtx_hook]+1}" ]]; then + chpwd_functions=( _rtx_hook ${chpwd_functions[@]} ) fi - shift - - case "$command" in - deactivate|shell) - eval "$($HOME/.cargo/bin/rtx "$command" "$@")" - ;; - *) - command $HOME/.cargo/bin/rtx "$command" "$@" - ;; - esac -} - -_rtx_hook() { - trap -- '' SIGINT; - eval "$("$HOME/.cargo/bin/rtx" hook-env -s zsh)"; - trap - SIGINT; -} -typeset -ag precmd_functions; -if [[ -z "${precmd_functions[(r)_rtx_hook]+1}" ]]; then - precmd_functions=( _rtx_hook ${precmd_functions[@]} ) -fi -typeset -ag chpwd_functions; -if [[ -z "${chpwd_functions[(r)_rtx_hook]+1}" ]]; then - chpwd_functions=( _rtx_hook ${chpwd_functions[@]} ) -fi fi