diff --git a/init.zsh b/init.zsh index 837d368..997a8f2 100644 --- a/init.zsh +++ b/init.zsh @@ -83,6 +83,11 @@ elif [[ -v INSIDE_EMACS ]]; then alias e='emacsclient ' alias emacs='emacsclient ' alias n='emacsclient ' +elif [[ -v DISTROBOX_ENTER_PATH ]]; then + alias EDITOR=nvim + alias n=nvim + alias e=nvim + alias emacs=nvim else export EDITOR='emacsclient -a nvim -nw' # Because I keep using n by mistake @@ -196,7 +201,7 @@ function overwrite-mode { zle -N overwrite-mode # Fancy prompt (starship) -eval "$(starship init zsh)" +cmd_exists starship && eval "$(starship init zsh)" # Change cursor shape for different vi modes. function __zsh_vim_key_prompt_handler { SPACESHIP_CHAR_SYMBOL="❮" @@ -250,10 +255,12 @@ if cmd_exists pyenv; then fi # Bookmarks -[[ -v BM_CWD_LS ]] || BM_CWD_LS=1 -[[ -v BM_MODE ]] || BM_MODE=daemon -[[ -v BM_AUTO_RELOAD ]] || BM_AUTO_RELOAD=1 -source "${ZSH_CONFIG_DIR}/emacs-bookmark.zsh" +if cmd_exists emacs; then + [[ -v BM_CWD_LS ]] || BM_CWD_LS=1 + [[ -v BM_MODE ]] || BM_MODE=daemon + [[ -v BM_AUTO_RELOAD ]] || BM_AUTO_RELOAD=1 + source "${ZSH_CONFIG_DIR}/emacs-bookmark.zsh" +fi # Platform specific stuff [ -f /usr/bin/pacman ] && source "${ZSH_CONFIG_DIR}/arch.zsh"