mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
more zsh style code
This commit is contained in:
parent
c9e30d863f
commit
9279eff0ad
2 changed files with 4 additions and 4 deletions
|
@ -74,8 +74,8 @@ _zsh_autosuggest_strategy_predefined() {
|
||||||
pname="${ZSH_AUTOSUGGEST_PREDEFINE_NAME:-$pname}"
|
pname="${ZSH_AUTOSUGGEST_PREDEFINE_NAME:-$pname}"
|
||||||
local names="${ZSH_AUTOSUGGEST_PREDEFINE_PATH};$pname"
|
local names="${ZSH_AUTOSUGGEST_PREDEFINE_PATH};$pname"
|
||||||
local array=()
|
local array=()
|
||||||
for i ("${(@s/;/)names}"); do
|
for i ("${(s:;:)names}"); do
|
||||||
if [ -n "$i" ] && [ -f "$i" ]; then
|
if [[ -n "$i" ]] && [[ -f "$i" ]]; then
|
||||||
local temp=(${(f)"$(<$i)"})
|
local temp=(${(f)"$(<$i)"})
|
||||||
array+=($temp)
|
array+=($temp)
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -640,8 +640,8 @@ _zsh_autosuggest_strategy_predefined() {
|
||||||
pname="${ZSH_AUTOSUGGEST_PREDEFINE_NAME:-$pname}"
|
pname="${ZSH_AUTOSUGGEST_PREDEFINE_NAME:-$pname}"
|
||||||
local names="${ZSH_AUTOSUGGEST_PREDEFINE_PATH};$pname"
|
local names="${ZSH_AUTOSUGGEST_PREDEFINE_PATH};$pname"
|
||||||
local array=()
|
local array=()
|
||||||
for i ("${(@s/;/)names}"); do
|
for i ("${(s:;:)names}"); do
|
||||||
if [ -n "$i" ] && [ -f "$i" ]; then
|
if [[ -n "$i" ]] && [[ -f "$i" ]]; then
|
||||||
local temp=(${(f)"$(<$i)"})
|
local temp=(${(f)"$(<$i)"})
|
||||||
array+=($temp)
|
array+=($temp)
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue