mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
cleanup: Consolidate autoload
s
This commit is contained in:
parent
ae315ded4d
commit
19e375bbc8
3 changed files with 6 additions and 6 deletions
|
@ -18,6 +18,8 @@ _zsh_autosuggest_start() {
|
||||||
_zsh_autosuggest_bind_widgets
|
_zsh_autosuggest_bind_widgets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Mark for auto-loading the functions that we use
|
||||||
|
autoload -Uz add-zsh-hook is-at-least
|
||||||
|
|
||||||
# Start the autosuggestion widgets on the next precmd
|
# Start the autosuggestion widgets on the next precmd
|
||||||
autoload -Uz add-zsh-hook
|
|
||||||
add-zsh-hook precmd _zsh_autosuggest_start
|
add-zsh-hook precmd _zsh_autosuggest_start
|
||||||
|
|
|
@ -45,8 +45,6 @@ _zsh_autosuggest_capture_completion_widget() {
|
||||||
zle -N autosuggest-capture-completion _zsh_autosuggest_capture_completion_widget
|
zle -N autosuggest-capture-completion _zsh_autosuggest_capture_completion_widget
|
||||||
|
|
||||||
_zsh_autosuggest_capture_setup() {
|
_zsh_autosuggest_capture_setup() {
|
||||||
autoload -Uz is-at-least
|
|
||||||
|
|
||||||
# There is a bug in zpty module in older zsh versions by which a
|
# There is a bug in zpty module in older zsh versions by which a
|
||||||
# zpty that exits will kill all zpty processes that were forked
|
# zpty that exits will kill all zpty processes that were forked
|
||||||
# before it. Here we set up a zsh exit hook to SIGKILL the zpty
|
# before it. Here we set up a zsh exit hook to SIGKILL the zpty
|
||||||
|
|
|
@ -541,8 +541,6 @@ _zsh_autosuggest_capture_completion_widget() {
|
||||||
zle -N autosuggest-capture-completion _zsh_autosuggest_capture_completion_widget
|
zle -N autosuggest-capture-completion _zsh_autosuggest_capture_completion_widget
|
||||||
|
|
||||||
_zsh_autosuggest_capture_setup() {
|
_zsh_autosuggest_capture_setup() {
|
||||||
autoload -Uz is-at-least
|
|
||||||
|
|
||||||
# There is a bug in zpty module in older zsh versions by which a
|
# There is a bug in zpty module in older zsh versions by which a
|
||||||
# zpty that exits will kill all zpty processes that were forked
|
# zpty that exits will kill all zpty processes that were forked
|
||||||
# before it. Here we set up a zsh exit hook to SIGKILL the zpty
|
# before it. Here we set up a zsh exit hook to SIGKILL the zpty
|
||||||
|
@ -853,6 +851,8 @@ _zsh_autosuggest_start() {
|
||||||
_zsh_autosuggest_bind_widgets
|
_zsh_autosuggest_bind_widgets
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Mark for auto-loading the functions that we use
|
||||||
|
autoload -Uz add-zsh-hook is-at-least
|
||||||
|
|
||||||
# Start the autosuggestion widgets on the next precmd
|
# Start the autosuggestion widgets on the next precmd
|
||||||
autoload -Uz add-zsh-hook
|
|
||||||
add-zsh-hook precmd _zsh_autosuggest_start
|
add-zsh-hook precmd _zsh_autosuggest_start
|
||||||
|
|
Loading…
Reference in a new issue