mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
Fix cd command if zoxide is missing (#2609)
* Fix cd command if zoxide is missing * Make use of omarchy-cmd-present
This commit is contained in:
@@ -4,16 +4,20 @@ alias lsa='ls -a'
|
|||||||
alias lt='eza --tree --level=2 --long --icons --git'
|
alias lt='eza --tree --level=2 --long --icons --git'
|
||||||
alias lta='lt -a'
|
alias lta='lt -a'
|
||||||
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
alias ff="fzf --preview 'bat --style=numbers --color=always {}'"
|
||||||
alias cd="zd"
|
|
||||||
zd() {
|
if omarchy-cmd-present z; then
|
||||||
if [ $# -eq 0 ]; then
|
alias cd="zd"
|
||||||
builtin cd ~ && return
|
zd() {
|
||||||
elif [ -d "$1" ]; then
|
if [ $# -eq 0 ]; then
|
||||||
builtin cd "$1"
|
builtin cd ~ && return
|
||||||
else
|
elif [ -d "$1" ]; then
|
||||||
z "$@" && printf "\U000F17A9 " && pwd || echo "Error: Directory not found"
|
builtin cd "$1"
|
||||||
fi
|
else
|
||||||
}
|
z "$@" && printf "\U000F17A9 " && pwd || echo "Error: Directory not found"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
open() {
|
open() {
|
||||||
xdg-open "$@" >/dev/null 2>&1 &
|
xdg-open "$@" >/dev/null 2>&1 &
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user