diff dot_zshrc @ 846:8a929c957d05

feat: check if rtx can be found
author Zeger Van de Vannet <zegervdv@me.com>
date Mon, 08 Jan 2024 08:49:30 +0100
parents e4d67607d020
children 8589883596fd
line wrap: on
line diff
--- a/dot_zshrc	Wed Feb 14 18:48:05 2024 +0100
+++ b/dot_zshrc	Mon Jan 08 08:49:30 2024 +0100
@@ -238,6 +238,10 @@
   fi
 }
 
+function try {
+  while "$@"; do :; done
+}
+
 # Suffix aliases
 alias -s py=nvim
 alias -s sv=nvim
@@ -316,8 +320,10 @@
 
 [ -f ~/.zshrc.local ] && source ~/.zshrc.local
 
-eval "$($HOME/bin/rtx activate zsh)"
-eval "$($HOME/bin/rtx hook-env)"
+if [ -f "$HOME/bin/rtx" ]; then
+  eval "$($HOME/bin/rtx activate zsh)"
+  eval "$($HOME/bin/rtx hook-env)"
+fi
 
 export SUDO_EDITOR=$(which hx)
 eval "$(direnv hook zsh)"