From 91ec7985ad8488c171c14605a3ba8437c3009276 Mon Sep 17 00:00:00 2001 From: Jeffrey Date: Wed, 5 Aug 2026 17:11:17 +0800 Subject: [PATCH] fix(zshrc): only alias k when the omz k plugin loaded Lean plugin prefs drop k; an unconditional k=k -h alias then points at nothing useful. Gate on the function the plugin defines. --- .zshrc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 568a6af..e0d840f 100644 --- a/.zshrc +++ b/.zshrc @@ -292,4 +292,7 @@ command -v zoxide &> /dev/null && eval "$(zoxide init zsh)" # Short jump alias; expands at use time after zoxide defines `z`. alias j="z" -alias k="k -h" # show human readable file sizes, in kb, mb etc +# k plugin ships a `k` function; only alias when it actually loaded. +if (( $+functions[k] )); then + alias k="k -h" # human-readable sizes +fi