Compare commits

...

2 Commits

Author SHA1 Message Date
9afcf62bf3
Zsh - Move MSYS to zshrc 2026-06-10 11:40:00 +02:00
c159b6dfdd
Zsh completions changes 2026-06-10 11:36:26 +02:00
2 changed files with 18 additions and 7 deletions

View File

@ -140,12 +140,11 @@ function __zsh_compl () {
# Some functions, like _apt and _dpkg, are very slow. We can use a cache in
# order to speed things up
if [[ ${__COMP_CACHING:-yes} == yes ]]; then
__COMP_CACHE_DIR=${__COMP_CACHE_DIR:-${ZDOTDIR:-$HOME}/.cache}
if [[ ! -d ${__COMP_CACHE_DIR} ]]; then
command mkdir -p "${__COMP_CACHE_DIR}"
if [[ ! -d ${ZSH_COMPDIR} ]]; then
command mkdir -p "${ZSH_COMPDIR}"
fi
zstyle ':completion:*' use-cache yes
zstyle ':completion:*:complete:*' cache-path "${__COMP_CACHE_DIR}"
zstyle ':completion:*:complete:*' cache-path "${ZSH_COMPDIR}"
fi
# host completion

View File

@ -16,6 +16,13 @@ if zmodload zsh/terminfo && (( "$terminfo[colors]" >= "256" )); then
__MATERUS_ZSH_256COLORS="${__MATERUS_ZSH_256COLORS:-0}";
fi
#MSYS
if [[ "$(uname -s)" =~ ^MSYS_NT.* ]]; then
#Use windows symlink instead copy
export MSYS=winsymlinks:nativestrict
fi
#region Plugins
# Clone plugins if not exists
[ -d $ZSH_DATA_DIR/plugins/powerlevel10k ] || git clone https://github.com/romkatv/powerlevel10k $ZSH_DATA_DIR/plugins/powerlevel10k
@ -24,8 +31,6 @@ fi
[ -d $ZSH_DATA_DIR/plugins/zsh-autosuggestions ] || git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_DATA_DIR/plugins/zsh-autosuggestions
source ${ZSH_DATA_DIR}/plugins/powerlevel10k/powerlevel10k.zsh-theme
source ${ZSH_CONFIG_DIR}/extra/zinputrc
source ${ZSH_CONFIG_DIR}/extra/zshcompletion.zsh
source ${ZSH_DATA_DIR}/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ${ZSH_DATA_DIR}/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
@ -73,6 +78,8 @@ fi
#region Bindings
source ${ZSH_CONFIG_DIR}/extra/zinputrc
bindkey -r "^["
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
@ -85,8 +92,13 @@ bindkey '^[[3;2~' delete-word
#endregion
#region Completions
ZSH_COMPDUMP="${ZSH_COMPDUMP:-${XDG_CACHE_HOME:-${HOME}/.cache}/.zcompdump-${HOST}-${ZSH_VERSION}}"
ZSH_COMPDIR="${ZSH_COMPDIR:-${XDG_CACHE_HOME:-${HOME}/.cache}/zsh}"
ZSH_COMPDUMP="${ZSH_COMPDUMP:-${ZSH_COMPDIR}/.zcompdump-${HOST}-${ZSH_VERSION}}"
if [[ ! -d ${ZSH_COMPDIR} ]]; then
command mkdir -p "${ZSH_COMPDIR}"
fi
autoload -U compinit && compinit -d $ZSH_COMPDUMP
source ${ZSH_CONFIG_DIR}/extra/zshcompletion.zsh
#endregion
#region Functions