From 4097d6e0aeb3e2ec5f805ea1211e146a6cd26e13 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Sun, 10 Jun 2018 22:39:58 -0600 Subject: [PATCH] Support widgets starting with dashes (ex: `-a-widget`) Fixes #337 --- src/bind.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bind.zsh b/src/bind.zsh index 42a0dd0..f538379 100644 --- a/src/bind.zsh +++ b/src/bind.zsh @@ -69,7 +69,7 @@ _zsh_autosuggest_bind_widget() { }" # Create the bound widget - zle -N $widget _zsh_autosuggest_bound_${bind_count}_$widget + zle -N -- $widget _zsh_autosuggest_bound_${bind_count}_$widget } # Map all configured widgets to the right autosuggest widgets diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index e2e06be..0a1f9c6 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -206,7 +206,7 @@ _zsh_autosuggest_bind_widget() { }" # Create the bound widget - zle -N $widget _zsh_autosuggest_bound_${bind_count}_$widget + zle -N -- $widget _zsh_autosuggest_bound_${bind_count}_$widget } # Map all configured widgets to the right autosuggest widgets