diff --git a/layers/zsh.nix b/layers/zsh.nix
index db8fc163b98277a5699fc15efb8adfa5483399eb..6b40d6d41ac7357d5a8d185f8a1b02f855526f0d 100644
--- a/layers/zsh.nix
+++ b/layers/zsh.nix
@@ -49,6 +49,8 @@ in
     copy = "xclip -selection c -i";
     paste = "xclip -selection c -o";
 
+    err = "${pkgs.moreutils}/bin/errno $?";
+
     # Start tmux in a transient scope (a PAM session would be better but this works)
     tmux-new = "systemd-run --scope --user tmux";