comparison .zfun/zsh-autosuggestions/src/config.zsh @ 467:e1ce8897030d

zsh: import df6f6f9ff41 of zsh-autosuggestions
author Augie Fackler <raf@durin42.com>
date Mon, 03 Dec 2018 22:37:29 -0500
parents
children
comparison
equal deleted inserted replaced
466:f248cf012d9a 467:e1ce8897030d
1
2 #--------------------------------------------------------------------#
3 # Global Configuration Variables #
4 #--------------------------------------------------------------------#
5
6 # Color to use when highlighting suggestion
7 # Uses format of `region_highlight`
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 # Strategies to use to fetch a suggestion
15 # Will try each strategy in order until a suggestion is returned
16 (( ! ${+ZSH_AUTOSUGGEST_STRATEGY} )) && ZSH_AUTOSUGGEST_STRATEGY=(history)
17
18 # Widgets that clear the suggestion
19 (( ! ${+ZSH_AUTOSUGGEST_CLEAR_WIDGETS} )) && 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} )) && ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(
35 forward-char
36 end-of-line
37 vi-forward-char
38 vi-end-of-line
39 vi-add-eol
40 )
41
42 # Widgets that accept the entire suggestion and execute it
43 (( ! ${+ZSH_AUTOSUGGEST_EXECUTE_WIDGETS} )) && ZSH_AUTOSUGGEST_EXECUTE_WIDGETS=(
44 )
45
46 # Widgets that accept the suggestion as far as the cursor moves
47 (( ! ${+ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS} )) && ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS=(
48 forward-word
49 emacs-forward-word
50 vi-forward-word
51 vi-forward-word-end
52 vi-forward-blank-word
53 vi-forward-blank-word-end
54 vi-find-next-char
55 vi-find-next-char-skip
56 )
57
58 # Widgets that should be ignored (globbing supported but must be escaped)
59 (( ! ${+ZSH_AUTOSUGGEST_IGNORE_WIDGETS} )) && ZSH_AUTOSUGGEST_IGNORE_WIDGETS=(
60 orig-\*
61 beep
62 run-help
63 set-local-history
64 which-command
65 yank
66 yank-pop
67 )
68
69 # Max size of buffer to trigger autosuggestion. Leave null for no upper bound.
70 : ${ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=}
71
72 # Pty name for calculating autosuggestions asynchronously
73 : ${ZSH_AUTOSUGGEST_ASYNC_PTY_NAME=zsh_autosuggest_pty}