From 650aad5f08d0b75e5c81f2b5e700993b0e851e0e Mon Sep 17 00:00:00 2001 From: skywind3000 Date: Wed, 7 Mar 2018 17:11:12 +0800 Subject: [PATCH] update predefined strategies --- src/strategies/predefined.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strategies/predefined.zsh b/src/strategies/predefined.zsh index 138f79c..87173ad 100644 --- a/src/strategies/predefined.zsh +++ b/src/strategies/predefined.zsh @@ -38,7 +38,7 @@ _zsh_autosuggest_predefined_generate() { for p ("${(@s/:/)PATH}"); do [ ! -d "$p" ] && continue cd "$p" - local files=("${(@f)$(ls -la | awk -F ' ' '{print $9}')}") + local files=($(command ls)) for fn in ${files}; do if [ -x "$fn" ] && [[ "${fn:l}" != *.dll ]]; then if [ -f "$fn" ] && [[ "${fn:l}" != *.nls ]]; then diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index c592eb4..fc5ef94 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -604,7 +604,7 @@ _zsh_autosuggest_predefined_generate() { for p ("${(@s/:/)PATH}"); do [ ! -d "$p" ] && continue cd "$p" - local files=("${(@f)$(ls -la | awk -F ' ' '{print $9}')}") + local files=($(command ls)) for fn in ${files}; do if [ -x "$fn" ] && [[ "${fn:l}" != *.dll ]]; then if [ -f "$fn" ] && [[ "${fn:l}" != *.nls ]]; then