diff --git a/home/private_dot_config/zsh/conf.d/dots.zsh b/home/private_dot_config/zsh/conf.d/dots.zsh index dbef622..f8ddc3a 100644 --- a/home/private_dot_config/zsh/conf.d/dots.zsh +++ b/home/private_dot_config/zsh/conf.d/dots.zsh @@ -3,6 +3,7 @@ alias zdot='cd ${ZDOTDIR:-~}' alias dots='cd ${DOTFILES_DIR:-~/.dotfiles}' alias dots-drop='chezmoi forget --interactive $(chezmoi managed -p absolute | fzf -m)' # alias dots-add='chezmoi re-add --interactive' + function dots-add { chezmoi add $(chezmoi status | grep '^MM' | awk -v home="$HOME/" '{print home$2}' | fzf -m) } diff --git a/home/private_dot_config/zsh/conf.d/misc.zsh b/home/private_dot_config/zsh/conf.d/misc.zsh index 09ea1ea..69e680b 100644 --- a/home/private_dot_config/zsh/conf.d/misc.zsh +++ b/home/private_dot_config/zsh/conf.d/misc.zsh @@ -11,14 +11,4 @@ setopt NO_HIST_BEEP # Be quiet! MAGIC_ENTER_GIT_COMMAND="$MAGIC_ENTER_OTHER_COMMAND && git status -sb" MAGIC_ENTER_OTHER_COMMAND="ls -l ." -# let make handle it's own shell completion -zstyle ':completion::complete:make:*:targets' call-command true -# fzf-tab completions -# set descriptions format to enable group support -zstyle ':completion:*:descriptions' format '[%d]' -# set list-colors to enable filename colorizing -zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} - - -zstyle ':fzf-tab:complete:cd:*' fzf-preview 'lsd --tree --depth 2 --color always $realpath' diff --git a/home/private_dot_config/zsh/dot_zplugins b/home/private_dot_config/zsh/dot_zplugins index 09322b6..8b413f7 100644 --- a/home/private_dot_config/zsh/dot_zplugins +++ b/home/private_dot_config/zsh/dot_zplugins @@ -19,7 +19,7 @@ junegunn/fzf path:shell/key-bindings.zsh wfxr/forgit # prompt -romkatv/powerlevel10k kind:fpath +# romkatv/powerlevel10k kind:fpath ${ZDOTDIR}/plugins/prompt # start compinit before @@ -31,5 +31,6 @@ mattmc3/zephyr path:plugins/confd ${ZDOTDIR}/plugins/zexists # deferred +zsh-users/zsh-autosuggestions zdharma-continuum/fast-syntax-highlighting kind:defer Aloxaf/fzf-tab kind:defer diff --git a/home/private_dot_config/zsh/dot_zstyles b/home/private_dot_config/zsh/dot_zstyles index 8d5c213..4a0aedc 100644 --- a/home/private_dot_config/zsh/dot_zstyles +++ b/home/private_dot_config/zsh/dot_zstyles @@ -7,3 +7,17 @@ zstyle ':antidote:plugin:*' defer-options '-p' # Set this to whatever you want to use to edit a command zstyle :zle:edit-command-line editor vim + +# let make handle it's own shell completion +zstyle ':completion::complete:make:*:targets' call-command true + +# fzf-tab completions +# set descriptions format to enable group support +zstyle ':completion:*:descriptions' format '[%d]' +# set list-colors to enable filename colorizing +zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} + +if (( $+commands[eza] )); then + zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza --tree --level 2 --color always --icons always $realpath' +fi + diff --git a/home/private_dot_config/zsh/plugins/zexists/zexists.plugin.zsh b/home/private_dot_config/zsh/plugins/zexists/zexists.plugin.zsh index 0e6ee15..2effd45 100644 --- a/home/private_dot_config/zsh/plugins/zexists/zexists.plugin.zsh +++ b/home/private_dot_config/zsh/plugins/zexists/zexists.plugin.zsh @@ -6,9 +6,7 @@ function source-zshcmdd { # glob search for the zshcmd.d dir local -a zshcmdd=() [[ -n "$ZSHCMDD" ]] && zshcmdd+=($ZSHCMDD(N)) - [[ -n "$ZDOTDIR" ]] && zshcmdd+=( - $ZDOTDIR/exists.d/cmd(N) - ) + [[ -n "$ZDOTDIR" ]] && zshcmdd+=($ZDOTDIR/exists.d/cmd(N)) zshcmdd+=(${ZDOTDIR:-$HOME}/zexists.d/cmd(N)) if ! (( $#zshcmdd )); then diff --git a/home/private_dot_config/zsh/zexists.d/cmd/zoxide.zsh b/home/private_dot_config/zsh/zexists.d/cmd/zoxide.zsh index abedf12..d9f49a1 100644 --- a/home/private_dot_config/zsh/zexists.d/cmd/zoxide.zsh +++ b/home/private_dot_config/zsh/zexists.d/cmd/zoxide.zsh @@ -1,7 +1,7 @@ #!/usr/bin/env zsh -if is-exe lsd; then - export _ZO_FZF_OPTS="--preview 'command lsd --tree --color always --icon always {2..}'" +if (( $+commands[eza] )); then + export _ZO_FZF_OPTS="--preview 'command eza --tree --icons=always --color=always {2..}'" fi eval "$(zoxide init zsh --cmd cd)"