From 936a0c29a0b35965f770eb2aec08f43a3c9c226c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luna=20=C5=9Awi=C4=85tek?= Date: Tue, 21 Nov 2023 13:09:38 +0100 Subject: [PATCH] fix rtx path --- .zsh/rtx.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.zsh/rtx.zsh b/.zsh/rtx.zsh index 9ebac54..b380bf2 100644 --- a/.zsh/rtx.zsh +++ b/.zsh/rtx.zsh @@ -1,28 +1,28 @@ export RTX_SHELL=zsh - +RTX_BIN_PATH=$(whereis rtx | cut -d ':' -f2 | xargs) if iscmd rtx; then rtx() { local command command="${1:-}" if [ "$#" = 0 ]; then - command $HOME/.cargo/bin/rtx + command $RTX_BIN_PATH return fi shift case "$command" in deactivate|shell) - eval "$($HOME/.cargo/bin/rtx "$command" "$@")" + eval "$($RTX_BIN_PATH "$command" "$@")" ;; *) - command $HOME/.cargo/bin/rtx "$command" "$@" + command $RTX_BIN_PATH "$command" "$@" ;; esac } _rtx_hook() { trap -- '' SIGINT; - eval "$("$HOME/.cargo/bin/rtx" hook-env -s zsh)"; + eval "$("$RTX_BIN_PATH" hook-env -s zsh)"; trap - SIGINT; } typeset -ag precmd_functions;