addet ssh different oh-my-posh theme

This commit is contained in:
pika 2025-06-02 17:11:45 +02:00
parent a952a742d8
commit afd61edd60

13
.zshrc
View file

@ -108,8 +108,21 @@ __shell_qol__() {
fi fi
if command_exists zoxide; then if command_exists zoxide; then
local raw="$(zoxide --version | awk '{print $2}')"
local ver="${raw#v}" # remove leading 'v'
local ver="${ver%%-*}" # remove anything after dash
# local ver="$(zoxide --version | cut -d' ' -f2)"
if [[ "$ver" =~ ^0\.([0-5]|[0-9]{1,2})\. ]]; then
# older than 0.5.x
eval "$(zoxide init zsh)"
else
# newer than 0.5.x
eval "$(zoxide init zsh)" eval "$(zoxide init zsh)"
eval "$(zoxide init zsh --cmd cd)" eval "$(zoxide init zsh --cmd cd)"
fi
# ─< easier dir up >──────────────────────────────────────────────────────────────────────── # ─< easier dir up >────────────────────────────────────────────────────────────────────────
alias ..="z .." alias ..="z .."
else else