My zsh configuration
git clone https://github.com/m-col/zshrc
Files | Refs | Readme

-rw-r--r-- zsh-autosuggestions.zsh


      1 # -------------------------------------------------#
      2 # https://github.com/zsh-users/zsh-autosuggestions #
      3 # -------------------------------------------------#
      4 
      5 [[ ! -e $ZSH/zsh-autosuggestions/zsh-autosuggestions.zsh ]] && return
      6 source $ZSH/zsh-autosuggestions/zsh-autosuggestions.zsh
      7 
      8 # More info: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Widgets
      9 ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'
     10 
     11 # Prefix to use when saving original versions of bound widgets
     12 ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX=autosuggest-orig-
     13 
     14 #ZSH_AUTOSUGGEST_STRATEGY=default
     15 source $ZSH/claude-context/plugin.zsh
     16 ZSH_AUTOSUGGEST_STRATEGY=(claude match_prev_cmd)
     17 
     18 # Widgets that clear the suggestion
     19 ZSH_AUTOSUGGEST_CLEAR_WIDGETS=(
     20 	history-search-forward
     21 	history-search-backward
     22 	history-beginning-search-forward
     23 	history-beginning-search-backward
     24 	history-substring-search-up
     25 	history-substring-search-down
     26 	up-line-or-beginning-search
     27 	down-line-or-beginning-search
     28 	up-line-or-history
     29 	down-line-or-history
     30 	accept-line
     31 )
     32 
     33 # Widgets that accept the entire suggestion
     34 ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(
     35 	end-of-line
     36 	vi-end-of-line
     37 	vi-add-eol
     38 )
     39 
     40 # Widgets that accept the entire suggestion and execute it
     41 ZSH_AUTOSUGGEST_EXECUTE_WIDGETS=(
     42 )
     43 
     44 # Widgets that accept the suggestion as far as the cursor moves
     45 ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS=(
     46 	vi-forward-char
     47 	forward-word
     48 	vi-forward-word
     49 	vi-forward-word-end
     50 	vi-forward-blank-word
     51 	vi-forward-blank-word-end
     52 	vi-find-next-char
     53 	vi-find-next-char-skip
     54 )
     55 
     56 # Widgets that should be ignored (globbing supported but must be escaped)
     57 ZSH_AUTOSUGGEST_IGNORE_WIDGETS=(
     58 	orig-\*
     59 	beep
     60 	run-help
     61 	set-local-history
     62 	which-command
     63 	yank
     64 	yank-pop
     65 )
     66 
     67 # Max size of buffer to trigger autosuggestion. Leave undefined for no upper bound.
     68 ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=
     69 
     70 # Pty name for calculating autosuggestions asynchronously
     71 ZSH_AUTOSUGGEST_ASYNC_PTY_NAME=zsh_autosuggest_pty
     72