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.
This commit is contained in:
Jeffrey
2026-08-05 17:11:17 +08:00
parent d5eb16c4ab
commit 91ec7985ad
+4 -1
View File
@@ -292,4 +292,7 @@ command -v zoxide &> /dev/null && eval "$(zoxide init zsh)"
# Short jump alias; expands at use time after zoxide defines `z`. # Short jump alias; expands at use time after zoxide defines `z`.
alias j="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