addet ssh different oh-my-posh theme
This commit is contained in:
parent
a952a742d8
commit
afd61edd60
1 changed files with 15 additions and 2 deletions
17
.zshrc
17
.zshrc
|
@ -108,8 +108,21 @@ __shell_qol__() {
|
|||
fi
|
||||
|
||||
if command_exists zoxide; then
|
||||
eval "$(zoxide init zsh)"
|
||||
eval "$(zoxide init zsh --cmd cd)"
|
||||
|
||||
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 --cmd cd)"
|
||||
fi
|
||||
|
||||
# ─< easier dir up >────────────────────────────────────────────────────────────────────────
|
||||
alias ..="z .."
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue