Fix issue with substrings extraction

This commit is contained in:
Julien Nicoulaud
2011-01-01 19:17:02 +01:00
parent f575527564
commit f713934f6c
2 changed files with 5 additions and 5 deletions

View File

@@ -168,7 +168,7 @@ _zsh_highlight-zle-buffer() {
*': command') style=$ZSH_HIGHLIGHT_STYLES[command];;
*) if _zsh_check-path; then
style=$ZSH_HIGHLIGHT_STYLES[path]
elif [[ ${arg:0:1} = ${histchars:0:1} ]]; then
elif [[ $arg[0,1] = $histchars[0,1] ]]; then
style=$ZSH_HIGHLIGHT_STYLES[history-expansion]
else
style=$ZSH_HIGHLIGHT_STYLES[unknown-token]
@@ -188,7 +188,7 @@ _zsh_highlight-zle-buffer() {
*"*"*) $highlight_glob && style=$ZSH_HIGHLIGHT_STYLES[globbing] || style=$ZSH_HIGHLIGHT_STYLES[default];;
*) if _zsh_check-path; then
style=$ZSH_HIGHLIGHT_STYLES[path]
elif [[ ${arg:0:1} = ${histchars:0:1} ]]; then
elif [[ $arg[0,1] = $histchars[0,1] ]]; then
style=$ZSH_HIGHLIGHT_STYLES[history-expansion]
else
style=$ZSH_HIGHLIGHT_STYLES[default]