From 71b599512131f6e91ab187259247fb241feb1214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sun, 12 Sep 2021 11:02:44 +0200 Subject: [PATCH] Move the completion file to the cache dir --- .config/zsh/.zprofile | 14 +++----------- .config/zsh/.zshrc | 2 +- .zshenv | 1 + 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index f11da12..bded335 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -1,15 +1,7 @@ -# pip zsh completion start -function _pip_completion { - local words cword - read -Ac words - read -cn cword - reply=( $( COMP_WORDS="$words[*]" \ - COMP_CWORD=$(( cword-1 )) \ - PIP_AUTO_COMPLETE=1 $words[1] ) ) -} -compctl -K _pip_completion pip -# pip zsh completion end +# create the missing directories +[ ! -d "$COMPDIR" ] && mkdir -p "$COMPDIR" +# transmission if hash transmission-daemon 2>/dev/null; then transmission-daemon fi diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 65218f1..9881bf2 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -8,7 +8,7 @@ bindkey "^[3;5~" delete-char # Command completion autoload -U compinit -compinit +compinit -d "$COMPDIR/.zcompdump" # Prompt if [ -f "/usr/bin/liquidprompt" ]; then diff --git a/.zshenv b/.zshenv index 2f87109..4cb2645 100644 --- a/.zshenv +++ b/.zshenv @@ -7,6 +7,7 @@ export HISTSIZE=5000 export SAVEHIST=100000 # CLI config +export COMPDIR="$HOME/.cache/zsh" export CLICOLOR=1 export EDITOR='vim' export PAGER='less'