diff --git a/dot-config/zsh/all/functions.zsh b/dot-config/zsh/all/functions.zsh index 65dc99f..38d8133 100644 --- a/dot-config/zsh/all/functions.zsh +++ b/dot-config/zsh/all/functions.zsh @@ -3,6 +3,5 @@ # inherited in the environment so non-login shells need them, and you'll want # to call one in a script so non-interactive shells need them. autoload count -autoload dump autoload enphp autoload -Uz zargs zcalc zmv diff --git a/dot-config/zsh/functions/dump b/dot-config/zsh/functions/dump deleted file mode 100644 index 6a7b885..0000000 --- a/dot-config/zsh/functions/dump +++ /dev/null @@ -1,2 +0,0 @@ -#! zsh -print ${(qq)argv} diff --git a/dot-config/zsh/interactive/kitty.zsh b/dot-config/zsh/interactive/kitty.zsh deleted file mode 100644 index 6d08c9c..0000000 --- a/dot-config/zsh/interactive/kitty.zsh +++ /dev/null @@ -1,6 +0,0 @@ -if [[ -n $KITTY_INSTALLATION_DIR ]]; then - export KITTY_SHELL_INTEGRATION='no-title' - autoload -Uz -- $KITTY_INSTALLATION_DIR/shell-integration/zsh/kitty-integration - kitty-integration - unfunction kitty-integration -fi diff --git a/dot-config/zsh/zshrc.zsh b/dot-config/zsh/zshrc.zsh index 2eed74e..888d92d 100644 --- a/dot-config/zsh/zshrc.zsh +++ b/dot-config/zsh/zshrc.zsh @@ -10,6 +10,17 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi +# Optimised compinit taking advantage of zinit's completion handling, as well +# as compiling the resulting zcompdump file. Have zinit call this once +# everything is loaded using an atload ice. +dot-zsh-compinit() { + [[ -d $ZINIT[ZCOMPDUMP_PATH] ]] || mkdir -p ${ZINIT[ZCOMPDUMP_PATH]:h} + zicompinit || return $? + zicdreplay || return $? + ([[ $ZINIT[ZCOMPDUMP_PATH].zwc -nt $ZINIT[ZCOMPDUMP_PATH] ]] || zcompile $ZINIT[ZCOMPDUMP_PATH]) &! + return 0 +} + source $ZDOTDIR/plugins.zsh for f in $ZDOTDIR/interactive/*.zsh(N); source $f