mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Remove support for long-deprecated options
These options have been deprecated for over a year.
This commit is contained in:
parent
0c940e70f2
commit
dcce973287
4 changed files with 0 additions and 75 deletions
1
Makefile
1
Makefile
|
@ -5,7 +5,6 @@ SRC_FILES := \
|
||||||
$(SRC_DIR)/config.zsh \
|
$(SRC_DIR)/config.zsh \
|
||||||
$(SRC_DIR)/util.zsh \
|
$(SRC_DIR)/util.zsh \
|
||||||
$(SRC_DIR)/features.zsh \
|
$(SRC_DIR)/features.zsh \
|
||||||
$(SRC_DIR)/deprecated.zsh \
|
|
||||||
$(SRC_DIR)/bind.zsh \
|
$(SRC_DIR)/bind.zsh \
|
||||||
$(SRC_DIR)/highlight.zsh \
|
$(SRC_DIR)/highlight.zsh \
|
||||||
$(SRC_DIR)/widgets.zsh \
|
$(SRC_DIR)/widgets.zsh \
|
||||||
|
|
|
@ -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
|
|
|
@ -8,7 +8,6 @@ _zsh_autosuggest_start() {
|
||||||
add-zsh-hook -d precmd _zsh_autosuggest_start
|
add-zsh-hook -d precmd _zsh_autosuggest_start
|
||||||
|
|
||||||
_zsh_autosuggest_feature_detect
|
_zsh_autosuggest_feature_detect
|
||||||
_zsh_autosuggest_check_deprecated_config
|
|
||||||
_zsh_autosuggest_bind_widgets
|
_zsh_autosuggest_bind_widgets
|
||||||
|
|
||||||
if [ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]; then
|
if [ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]; then
|
||||||
|
|
|
@ -133,42 +133,6 @@ _zsh_autosuggest_feature_detect() {
|
||||||
zpty -d $ZSH_AUTOSUGGEST_ASYNC_PTY_NAME
|
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 #
|
# Widget Helpers #
|
||||||
#--------------------------------------------------------------------#
|
#--------------------------------------------------------------------#
|
||||||
|
@ -647,7 +611,6 @@ _zsh_autosuggest_start() {
|
||||||
add-zsh-hook -d precmd _zsh_autosuggest_start
|
add-zsh-hook -d precmd _zsh_autosuggest_start
|
||||||
|
|
||||||
_zsh_autosuggest_feature_detect
|
_zsh_autosuggest_feature_detect
|
||||||
_zsh_autosuggest_check_deprecated_config
|
|
||||||
_zsh_autosuggest_bind_widgets
|
_zsh_autosuggest_bind_widgets
|
||||||
|
|
||||||
if [ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]; then
|
if [ -n "${ZSH_AUTOSUGGEST_USE_ASYNC+x}" ]; then
|
||||||
|
|
Loading…
Reference in a new issue