Skip to content

Commit

Permalink
fix: updates zsh-autosuggestions after widgets (#43)
Browse files Browse the repository at this point in the history
Adding unique names for the widget from the function, so the key binding uses
the widget which then zsh-autosuggestions will pick up and rerun upon.

Closes #36

* https://github.com/zsh-users/zsh-autosuggestions/tree/master
  • Loading branch information
DeveloperC286 authored Mar 1, 2024
1 parent 0e674e1 commit 701a61b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zsh-simple-abbreviations.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ if [[ -n ${ZSH_VERSION} ]]; then

# Create key binding on space to expand into a possible abbreviations.
autoload -Uz __zsh_simple_abbreviations_expand
zle -N __zsh_simple_abbreviations_expand
bindkey " " __zsh_simple_abbreviations_expand
zle -N zsh_simple_abbreviations_expand __zsh_simple_abbreviations_expand
bindkey " " zsh_simple_abbreviations_expand

# Create key binding on control + space to insert a space without any possible abbreviations expansion.
autoload -Uz __zsh_simple_abbreviations_insert_space
zle -N __zsh_simple_abbreviations_insert_space
bindkey "^ " __zsh_simple_abbreviations_insert_space
zle -N zsh_simple_abbreviations_insert_space __zsh_simple_abbreviations_insert_space
bindkey "^ " zsh_simple_abbreviations_insert_space
fi

0 comments on commit 701a61b

Please sign in to comment.