Merge pull request #360 from zsh-users/fixes/glob-subst-bad-pattern

Reset opts in some functions affected by GLOB_SUBST
This commit is contained in:
Eric Freese 2018-07-17 22:26:55 -07:00 committed by GitHub
commit fa5d9c0ff5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View file

@ -74,6 +74,8 @@ _zsh_autosuggest_bind_widget() {
# Map all configured widgets to the right autosuggest widgets # Map all configured widgets to the right autosuggest widgets
_zsh_autosuggest_bind_widgets() { _zsh_autosuggest_bind_widgets() {
emulate -L zsh
local widget local widget
local ignore_widgets local ignore_widgets

View file

@ -37,6 +37,8 @@ _zsh_autosuggest_clear() {
# Modify the buffer and get a new suggestion # Modify the buffer and get a new suggestion
_zsh_autosuggest_modify() { _zsh_autosuggest_modify() {
emulate -L zsh
local -i retval local -i retval
# Only available in zsh >= 5.4 # Only available in zsh >= 5.4
@ -104,6 +106,8 @@ _zsh_autosuggest_fetch() {
# Offer a suggestion # Offer a suggestion
_zsh_autosuggest_suggest() { _zsh_autosuggest_suggest() {
emulate -L zsh
local suggestion="$1" local suggestion="$1"
if [[ -n "$suggestion" ]] && (( $#BUFFER )); then if [[ -n "$suggestion" ]] && (( $#BUFFER )); then

View file

@ -184,6 +184,8 @@ _zsh_autosuggest_bind_widget() {
# Map all configured widgets to the right autosuggest widgets # Map all configured widgets to the right autosuggest widgets
_zsh_autosuggest_bind_widgets() { _zsh_autosuggest_bind_widgets() {
emulate -L zsh
local widget local widget
local ignore_widgets local ignore_widgets
@ -291,6 +293,8 @@ _zsh_autosuggest_clear() {
# Modify the buffer and get a new suggestion # Modify the buffer and get a new suggestion
_zsh_autosuggest_modify() { _zsh_autosuggest_modify() {
emulate -L zsh
local -i retval local -i retval
# Only available in zsh >= 5.4 # Only available in zsh >= 5.4
@ -358,6 +362,8 @@ _zsh_autosuggest_fetch() {
# Offer a suggestion # Offer a suggestion
_zsh_autosuggest_suggest() { _zsh_autosuggest_suggest() {
emulate -L zsh
local suggestion="$1" local suggestion="$1"
if [[ -n "$suggestion" ]] && (( $#BUFFER )); then if [[ -n "$suggestion" ]] && (( $#BUFFER )); then