Skip to content

Commit

Permalink
complete (ble/complete/source:file): remove slow old codes
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed May 20, 2021
1 parent 6871634 commit 60a33e2
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions lib/core-complete.sh
Expand Up @@ -891,18 +891,10 @@ function ble/complete/source:file/.impl {
ble/complete/util/eval-pathname-expansion "$ret"

local -a candidates=()
local cand
if [[ :$opts: == *:directory:* ]]; then
for cand in "${ret[@]}"; do
[[ -d $cand ]] || continue
[[ $cand == / ]] || cand=${cand%/}
ble/array#push candidates "$cand"
done
candidates=("${ret[@]%/}")
else
for cand in "${ret[@]}"; do
[[ -e $cand || -h $cand ]] || continue
ble/array#push candidates "$cand"
done
candidates=("${ret[@]}")
fi

local rex_hidden=
Expand Down

0 comments on commit 60a33e2

Please sign in to comment.