From 81c3491c57f62d4475f7b1b140a9db0e9ee80a1d Mon Sep 17 00:00:00 2001 From: ignuki Date: Sun, 30 Mar 2025 10:37:25 +0200 Subject: [PATCH] adjust completion in zsh --- .gitmodules | 3 +++ zsh/.zshrc | 5 ++++- zsh/completion.zsh | 17 ----------------- zsh/zsh-autosuggestions | 1 + 4 files changed, 8 insertions(+), 18 deletions(-) create mode 160000 zsh/zsh-autosuggestions diff --git a/.gitmodules b/.gitmodules index a9025a1..80dd87a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "scripts/pokemon-colorscripts"] path = scripts/pokemon-colorscripts url = https://gitlab.com/phoneybadger/pokemon-colorscripts.git +[submodule "zsh/zsh-autosuggestions"] + path = zsh/zsh-autosuggestions + url = https://github.com/zsh-users/zsh-autosuggestions diff --git a/zsh/.zshrc b/zsh/.zshrc index 3d68799..e6dcb2e 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -31,8 +31,11 @@ esac bindkey "^[[1;5C" forward-word bindkey "^[[1;5D" backward-word +# Set fpath before sourcing completion.zsh +fpath=("$DOTFILES/zsh/zsh-completions/src" $fpath) +# Source completion configuration source "$DOTFILES/zsh/completion.zsh" -fpath=("$DOTFILES/zsh/zsh-completions/src" "$fpath") +source "$DOTFILES/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" diff --git a/zsh/completion.zsh b/zsh/completion.zsh index 4ea5b6e..788d09d 100644 --- a/zsh/completion.zsh +++ b/zsh/completion.zsh @@ -1,26 +1,9 @@ -# ____ ___ __ __ ____ _ _____ _____ ___ ___ _ _ -# / ___/ _ \| \/ | _ \| | | ____|_ _|_ _/ _ \| \ | | -# | | | | | | |\/| | |_) | | | _| | | | | | | | \| | -# | |__| |_| | | | | __/| |___| |___ | | | | |_| | |\ | -# \____\___/|_| |_|_| |_____|_____| |_| |___\___/|_| \_| - # - -# +---------+ -# | General | -# +---------+ - -# source ./gambit.zsh - # Should be called before compinit zmodload zsh/complist autoload -U compinit; compinit _comp_options+=(globdots) # With hidden files -# Only work with the Zsh function vman -# See $DOTFILES/zsh/scripts.zsh -compdef vman="man" - # +---------+ # | Options | # +---------+ diff --git a/zsh/zsh-autosuggestions b/zsh/zsh-autosuggestions new file mode 160000 index 0000000..0e810e5 --- /dev/null +++ b/zsh/zsh-autosuggestions @@ -0,0 +1 @@ +Subproject commit 0e810e5afa27acbd074398eefbe28d13005dbc15