more zsh style code

This commit is contained in:
skywind3000 2018-02-08 02:53:35 +08:00
parent 9279eff0ad
commit f06305c948
2 changed files with 2 additions and 2 deletions

View file

@ -67,7 +67,7 @@ _zsh_autosuggest_strategy_predefined() {
local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}"
local result="${history[(r)${prefix}*]}"
if [[ $result == "" ]]; then
if [[ -z "$result" ]]; then
if (( ! ${+_ZSH_AUTOSUGGEST_PREDEFINE} )); then
typeset -g _ZSH_AUTOSUGGEST_PREDEFINE=()
local pname="$HOME/.zsh_autosuggest"

View file

@ -633,7 +633,7 @@ _zsh_autosuggest_strategy_predefined() {
local prefix="${1//(#m)[\\*?[\]<>()|^~#]/\\$MATCH}"
local result="${history[(r)${prefix}*]}"
if [[ $result == "" ]]; then
if [[ -z "$result" ]]; then
if (( ! ${+_ZSH_AUTOSUGGEST_PREDEFINE} )); then
typeset -g _ZSH_AUTOSUGGEST_PREDEFINE=()
local pname="$HOME/.zsh_autosuggest"