diff options
Diffstat (limited to 'config/essentials/zsh/.zshrc')
-rw-r--r-- | config/essentials/zsh/.zshrc | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 1260bb0..9b6fa48 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -25,24 +25,9 @@ zle -N add-surround surround zle -N change-surround surround compinit -if grep -qi "debian\|ubuntu" /usr/lib/os-release /etc/os-release 2>/dev/null -then - sfiles=( - /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh - /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh - ) -else - sfiles=( - /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh - /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh) -fi -sfiles+=( - ~/.config/zsh/functions.zsh - ~/.config/zsh/aliases.sh -) -for f in "${sfiles[@]}"; do - test -f "$f" && source "$f" -done +# Source files +. $ZDOTDIR/functions.zsh +. $ZDOTDIR/aliases.sh bindkey -v bindkey -a cs change-surround @@ -137,6 +122,23 @@ parse_git_status() { git status --short 2> /dev/null | head -n1 | awk '{print $1 " "}' } +# Completion +_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 + export REPORTTIME=2 export TIMEFMT="-> %*E" # override built-in time command |