diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-02-03 18:29:31 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-02-03 18:29:31 +0100 |
commit | 07ad983aebf388065be7d650b7e08204100d1ed4 (patch) | |
tree | 5a3ae361ea5e84c36a577f385bce308bab0dfee1 /config/essentials/zsh/comp.zsh | |
parent | 541d9fa7014c5c197f7c8a09fa159ac84bd9a6a8 (diff) |
Update shell
*Added alias
*changed mutt to not use symlink
*changed starship looks
*use comp.zsh instead of plugin
*remove git-alias plugin
*added auto rehash
*removed rehash hook
Diffstat (limited to 'config/essentials/zsh/comp.zsh')
-rw-r--r-- | config/essentials/zsh/comp.zsh | 103 |
1 files changed, 54 insertions, 49 deletions
diff --git a/config/essentials/zsh/comp.zsh b/config/essentials/zsh/comp.zsh index 94d76b1..4836111 100644 --- a/config/essentials/zsh/comp.zsh +++ b/config/essentials/zsh/comp.zsh @@ -1,49 +1,54 @@ -# ### Completion - -# autoload -Uz compinit; compinit -# zstyle ':compinstall' filename '/home/aluc/.zshrc' -# # cache -# zstyle ':completion:*' use-cache on -# zstyle ':completion:*' cache-path "$ZDOTDIR/zcompcache" - -# # completers -# zstyle ':completion:*' completer _extensions _complete - -# # format -# zstyle ':completion:*:*:*:*:descriptions' format '%F{blue}-- %D%d --%f' -# zstyle ':completion:*:*:*:*:messages' format '%F{purple}-- %d --%f' -# zstyle ':completion:*:*:*:*:warnings' format '%F{red}-- no matches found --%f' -# zstyle ':completion:*:default' list-prompt '%S%M matches%s' -# # show a 'ls -a' like outptut when listing files -# zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS} - -# # Group completions by categories -# zstyle ':completion:*' group-name '' -# zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands - -# zstyle ':completion:*' squeeze-slashes true - -# # Prefer completing for an option (think cd -) -# zstyle ':completion:*' complete-options true - -# # keep prefix when completing -# zstyle ':completion:*' keep-prefix true - -# # ui -# zstyle ':completion:*' menu select - -# _dotnet_zsh_complete() -# { -# local completions=("$(dotnet complete "$words")") - -# # If the completion list is empty, just continue with filename selection -# if [ -z "$completions" ] -# then -# _arguments '*::arguments: _normal' -# return -# fi - -# # This is not a variable assignment, don't remove spaces! -# _values = "${(ps:\n:)completions}" -# } -# compdef _dotnet_zsh_complete dotnet
\ No newline at end of file +### Completion +# Find most of the stuff at https://github.com/zap-zsh/completions + +zmodload zsh/complist +autoload -Uz compinit; compinit +zstyle ':compinstall' filename '/home/aluc/.zshrc' +# cache +zstyle ':completion:*' use-cache on +zstyle ':completion:*' cache-path "$ZDOTDIR/zcompcache" + +# completers +zstyle ':completion:*' completer _extensions _complete + +# format +zstyle ':completion:*:*:*:*:descriptions' format '%F{blue}-- %D%d --%f' +zstyle ':completion:*:*:*:*:messages' format '%F{purple}-- %d --%f' +zstyle ':completion:*:*:*:*:warnings' format '%F{red}-- no matches found --%f' +zstyle ':completion:*:default' list-prompt '%S%M matches%s' +# show a 'ls -a' like outptut when listing files +zstyle ':completion:*:*:*:*:default' list-colors ${(s.:.)LS_COLORS} + +# automatically find new executables in PATH +zstyle ':completion:*' rehash true + +# Group completions by categories +zstyle ':completion:*' group-name '' +zstyle ':completion:*:*:-command-:*:*' group-order aliases builtins functions commands + +zstyle ':completion:*' squeeze-slashes true + +# Prefer completing for an option (think cd -) +zstyle ':completion:*' complete-options true + +# keep prefix when completing +zstyle ':completion:*' keep-prefix true + +# ui +zstyle ':completion:*' menu select + +_dotnet_zsh_complete() +{ + local completions=("$(dotnet complete "$words")") + + # If the completion list is empty, just continue with filename selection + if [ -z "$completions" ] + then + _arguments '*::arguments: _normal' + return + fi + + # This is not a variable assignment, don't remove spaces! + _values = "${(ps:\n:)completions}" +} +compdef _dotnet_zsh_complete dotnet |