From dcce973287c181bad0d54c85590b5b3999221823 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Fri, 17 Feb 2017 18:45:46 -0700 Subject: [PATCH] Remove support for long-deprecated options These options have been deprecated for over a year. --- Makefile | 1 - src/deprecated.zsh | 36 ------------------------------------ src/start.zsh | 1 - zsh-autosuggestions.zsh | 37 ------------------------------------- 4 files changed, 75 deletions(-) delete mode 100644 src/deprecated.zsh diff --git a/Makefile b/Makefile index c7aaf1d..51d1b0c 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,6 @@ SRC_FILES := \ $(SRC_DIR)/config.zsh \ $(SRC_DIR)/util.zsh \ $(SRC_DIR)/features.zsh \ - $(SRC_DIR)/deprecated.zsh \ $(SRC_DIR)/bind.zsh \ $(SRC_DIR)/highlight.zsh \ $(SRC_DIR)/widgets.zsh \ diff --git a/src/deprecated.zsh b/src/deprecated.zsh deleted file mode 100644 index bcf0d74..0000000 --- a/src/deprecated.zsh +++ /dev/null @@ -1,36 +0,0 @@ - -#--------------------------------------------------------------------# -# Handle Deprecated Variables/Widgets # -#--------------------------------------------------------------------# - -_zsh_autosuggest_deprecated_warning() { - >&2 echo "zsh-autosuggestions: $@" -} - -_zsh_autosuggest_check_deprecated_config() { - if [ -n "$AUTOSUGGESTION_HIGHLIGHT_COLOR" ]; then - _zsh_autosuggest_deprecated_warning "AUTOSUGGESTION_HIGHLIGHT_COLOR is deprecated. Use ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE instead." - [ -z "$ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" ] && ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=$AUTOSUGGESTION_HIGHLIGHT_STYLE - unset AUTOSUGGESTION_HIGHLIGHT_STYLE - fi - - if [ -n "$AUTOSUGGESTION_HIGHLIGHT_CURSOR" ]; then - _zsh_autosuggest_deprecated_warning "AUTOSUGGESTION_HIGHLIGHT_CURSOR is deprecated." - unset AUTOSUGGESTION_HIGHLIGHT_CURSOR - fi - - if [ -n "$AUTOSUGGESTION_ACCEPT_RIGHT_ARROW" ]; then - _zsh_autosuggest_deprecated_warning "AUTOSUGGESTION_ACCEPT_RIGHT_ARROW is deprecated. The right arrow now accepts the suggestion by default." - unset AUTOSUGGESTION_ACCEPT_RIGHT_ARROW - fi -} - -_zsh_autosuggest_deprecated_start_widget() { - _zsh_autosuggest_deprecated_warning "The autosuggest-start widget is deprecated. For more info, see the README at https://github.com/zsh-users/zsh-autosuggestions." - zle -D autosuggest-start - eval "zle-line-init() { - $(echo $functions[${widgets[zle-line-init]#*:}] | sed -e 's/zle autosuggest-start//g') - }" -} - -zle -N autosuggest-start _zsh_autosuggest_deprecated_start_widget diff --git a/src/start.zsh b/src/start.zsh index 49af555..a982f2d 100644 --- a/src/start.zsh +++ b/src/start.zsh @@ -8,7 +8,6 @@ _zsh_autosuggest_start() { add-zsh-hook -d precmd _zsh_autosuggest_start _zsh_autosuggest_feature_detect - _zsh_autosuggest_check_deprecated_config _zsh_autosuggest_bind_widgets if [ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]; then diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 8bfe6db..3ece082 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -133,42 +133,6 @@ _zsh_autosuggest_feature_detect() { zpty -d $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME } -#--------------------------------------------------------------------# -# Handle Deprecated Variables/Widgets # -#--------------------------------------------------------------------# - -_zsh_autosuggest_deprecated_warning() { - >&2 echo "zsh-autosuggestions: $@" -} - -_zsh_autosuggest_check_deprecated_config() { - if [ -n "$AUTOSUGGESTION_HIGHLIGHT_COLOR" ]; then - _zsh_autosuggest_deprecated_warning "AUTOSUGGESTION_HIGHLIGHT_COLOR is deprecated. Use ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE instead." - [ -z "$ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" ] && ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=$AUTOSUGGESTION_HIGHLIGHT_STYLE - unset AUTOSUGGESTION_HIGHLIGHT_STYLE - fi - - if [ -n "$AUTOSUGGESTION_HIGHLIGHT_CURSOR" ]; then - _zsh_autosuggest_deprecated_warning "AUTOSUGGESTION_HIGHLIGHT_CURSOR is deprecated." - unset AUTOSUGGESTION_HIGHLIGHT_CURSOR - fi - - if [ -n "$AUTOSUGGESTION_ACCEPT_RIGHT_ARROW" ]; then - _zsh_autosuggest_deprecated_warning "AUTOSUGGESTION_ACCEPT_RIGHT_ARROW is deprecated. The right arrow now accepts the suggestion by default." - unset AUTOSUGGESTION_ACCEPT_RIGHT_ARROW - fi -} - -_zsh_autosuggest_deprecated_start_widget() { - _zsh_autosuggest_deprecated_warning "The autosuggest-start widget is deprecated. For more info, see the README at https://github.com/zsh-users/zsh-autosuggestions." - zle -D autosuggest-start - eval "zle-line-init() { - $(echo $functions[${widgets[zle-line-init]#*:}] | sed -e 's/zle autosuggest-start//g') - }" -} - -zle -N autosuggest-start _zsh_autosuggest_deprecated_start_widget - #--------------------------------------------------------------------# # Widget Helpers # #--------------------------------------------------------------------# @@ -647,7 +611,6 @@ _zsh_autosuggest_start() { add-zsh-hook -d precmd _zsh_autosuggest_start _zsh_autosuggest_feature_detect - _zsh_autosuggest_check_deprecated_config _zsh_autosuggest_bind_widgets if [ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]; then