Compare commits

...

3 Commits

Author SHA1 Message Date
Eric Freese
c761dc8150 bump version v0.2.15 2016-02-24 18:40:24 -07:00
Eric Freese
cc921994e6 Fix #127 by adding quotes 2016-02-24 18:35:17 -07:00
Eric Freese
0242c7eff1 Fix highlighting when sh_word_split option is enabled 2016-02-24 13:59:49 -07:00
4 changed files with 6 additions and 6 deletions

View File

@@ -1 +1 @@
v0.2.14 v0.2.15

View File

@@ -15,7 +15,7 @@ _zsh_autosuggest_highlight_reset() {
_zsh_autosuggest_highlight_apply() { _zsh_autosuggest_highlight_apply() {
if [ $#POSTDISPLAY -gt 0 ]; then if [ $#POSTDISPLAY -gt 0 ]; then
_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
region_highlight+=($_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT) region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT")
else else
unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
fi fi

View File

@@ -5,7 +5,7 @@
# Get a suggestion from history that matches a given prefix # Get a suggestion from history that matches a given prefix
_zsh_autosuggest_suggestion() { _zsh_autosuggest_suggestion() {
local prefix=$(_zsh_autosuggest_escape_command_prefix "$1") local prefix="$(_zsh_autosuggest_escape_command_prefix "$1")"
# Get all history items (reversed) that match pattern $prefix* # Get all history items (reversed) that match pattern $prefix*
local history_matches local history_matches

View File

@@ -1,6 +1,6 @@
# Fish-like fast/unobtrusive autosuggestions for zsh. # Fish-like fast/unobtrusive autosuggestions for zsh.
# https://github.com/tarruda/zsh-autosuggestions # https://github.com/tarruda/zsh-autosuggestions
# v0.2.14 # v0.2.15
# Copyright (c) 2013 Thiago de Arruda # Copyright (c) 2013 Thiago de Arruda
# Copyright (c) 2016 Eric Freese # Copyright (c) 2016 Eric Freese
# #
@@ -196,7 +196,7 @@ _zsh_autosuggest_highlight_reset() {
_zsh_autosuggest_highlight_apply() { _zsh_autosuggest_highlight_apply() {
if [ $#POSTDISPLAY -gt 0 ]; then if [ $#POSTDISPLAY -gt 0 ]; then
_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
region_highlight+=($_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT) region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT")
else else
unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
fi fi
@@ -291,7 +291,7 @@ zle -N autosuggest-clear _zsh_autosuggest_widget_clear
# Get a suggestion from history that matches a given prefix # Get a suggestion from history that matches a given prefix
_zsh_autosuggest_suggestion() { _zsh_autosuggest_suggestion() {
local prefix=$(_zsh_autosuggest_escape_command_prefix "$1") local prefix="$(_zsh_autosuggest_escape_command_prefix "$1")"
# Get all history items (reversed) that match pattern $prefix* # Get all history items (reversed) that match pattern $prefix*
local history_matches local history_matches