more zsh style code

This commit is contained in:
skywind3000 2018-02-07 17:44:47 +08:00
parent c9e30d863f
commit 9279eff0ad
2 changed files with 4 additions and 4 deletions

View file

@ -74,8 +74,8 @@ _zsh_autosuggest_strategy_predefined() {
pname="${ZSH_AUTOSUGGEST_PREDEFINE_NAME:-$pname}"
local names="${ZSH_AUTOSUGGEST_PREDEFINE_PATH};$pname"
local array=()
for i ("${(@s/;/)names}"); do
if [ -n "$i" ] && [ -f "$i" ]; then
for i ("${(s:;:)names}"); do
if [[ -n "$i" ]] && [[ -f "$i" ]]; then
local temp=(${(f)"$(<$i)"})
array+=($temp)
fi

View file

@ -640,8 +640,8 @@ _zsh_autosuggest_strategy_predefined() {
pname="${ZSH_AUTOSUGGEST_PREDEFINE_NAME:-$pname}"
local names="${ZSH_AUTOSUGGEST_PREDEFINE_PATH};$pname"
local array=()
for i ("${(@s/;/)names}"); do
if [ -n "$i" ] && [ -f "$i" ]; then
for i ("${(s:;:)names}"); do
if [[ -n "$i" ]] && [[ -f "$i" ]]; then
local temp=(${(f)"$(<$i)"})
array+=($temp)
fi