diff --git a/configs/home-manager/zsh.nix b/configs/home-manager/zsh.nix
index 8ea8efb..689d576 100644
--- a/configs/home-manager/zsh.nix
+++ b/configs/home-manager/zsh.nix
@@ -46,6 +46,9 @@
             curl cheat.sh/$i
             done
           }
+          #the tre command has some shell integration.
+          tre() { command tre "$@" --editor && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
+          tred() { command tre "$@" --editor=z --directories && source "/tmp/tre_aliases_$USER" 2>/dev/null; }
         ''
         (lib.mkIf (!config.programs.starship.enable) ''
           autoload -U promptinit
@@ -103,5 +106,6 @@
   services.gpg-agent.enableZshIntegration = true;
   home.packages = with pkgs; [
     curl
+    tre-command
   ];
 }