File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- eval " $( mise activate zsh) "
1+ command -v mise > /dev/null && eval " $( mise activate zsh) "
Original file line number Diff line number Diff line change 1- alias vim=' nvim'
1+ vim () {
2+ if command -v nvim > /dev/null 2>&1 ; then
3+ nvim " $@ "
4+ else
5+ command vim " $@ "
6+ fi
7+ }
Original file line number Diff line number Diff line change 1- if [[ -z " $ZELLIJ " ]]; then
1+ if [[ -z " $ZELLIJ " ]] && command -v zellij > /dev/null ; then
22 zellij attach -c main
33fi
44
6363# Initialize starship prompt
6464eval " $( starship init zsh) "
6565
66- # Aliases
67- alias cat=' bat -p'
68- alias ls=' eza'
69- alias ll=' eza -l'
70- alias la=' eza -la'
71- alias cd=' z'
66+ # Command wrappers - check availability on each call for graceful fallback
67+ cat () {
68+ if command -v bat > /dev/null 2>&1 ; then
69+ bat -p " $@ "
70+ else
71+ command cat " $@ "
72+ fi
73+ }
74+
75+ ls () {
76+ if command -v eza > /dev/null 2>&1 ; then
77+ eza " $@ "
78+ else
79+ command ls " $@ "
80+ fi
81+ }
82+
83+ ll () {
84+ if command -v eza > /dev/null 2>&1 ; then
85+ eza -l " $@ "
86+ else
87+ command ls -l " $@ "
88+ fi
89+ }
90+
91+ la () {
92+ if command -v eza > /dev/null 2>&1 ; then
93+ eza -la " $@ "
94+ else
95+ command ls -la " $@ "
96+ fi
97+ }
98+
99+ cd () {
100+ if command -v zoxide > /dev/null 2>&1 ; then
101+ z " $@ "
102+ else
103+ builtin cd " $@ "
104+ fi
105+ }
You can’t perform that action at this time.
0 commit comments