From 9fc505336cc209d763a4a907efef4de825839283 Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 5 Oct 2023 21:29:44 +0200 Subject: [PATCH] chore and add zoxide --- zsh/.zlogin | 8 ++++++++ zsh/.zshenv | 6 +----- zsh/.zshrc | 2 -- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/zsh/.zlogin b/zsh/.zlogin index 6f32dba..2ae3cc3 100644 --- a/zsh/.zlogin +++ b/zsh/.zlogin @@ -1 +1,9 @@ [[ "$(uname)" == 'Darwin' ]] && export PATH="/opt/homebrew/bin:$PATH" + +if builtin type -p dircolors &> /dev/null; then + eval "$(dircolors)" +fi + +if builtin type -p zoxide &> /dev/null; then + eval "$(zoxide init zsh)" +fi diff --git a/zsh/.zshenv b/zsh/.zshenv index bfc845d..4dc280a 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,13 +1,9 @@ export GOPATH="$HOME/.go" export PATH="$HOME/.cargo/bin:$HOME/.gem/bin:$GOPATH/bin:$HOME/.dotfiles/bin:$PATH:$HOME/.local/bin" -if [[ -x /usr/bin/nvim ]] || [[ -x /opt/homebrew/bin/nvim ]]; then +if builtin type -p nvim &> /dev/null; then export EDITOR=nvim -elif [[ -x /usr/bin/vim ]] || [[ -x /opt/homebrew/bin/vim ]]; then - export EDITOR=vim fi export LESS="-FRSMKI" export SYSTEMD_LESS="FRSMKI" - -[[ -x /usr/bin/dircolors ]] && eval "$(dircolors)" diff --git a/zsh/.zshrc b/zsh/.zshrc index 1dca77f..2eba25a 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -24,8 +24,6 @@ alias :q="exit" alias ..="cd .." alias grep="grep --color=auto" -[[ -x /usr/bin/xdg-open ]] && alias open="xdg-open" - bindkey -e if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then