Switch to mapfile for a minor completions speed improvement

Former-commit-id: b1c6d34c450dc0adb6df20fa25a7fa53c6c39ccb [formerly 1975424886]
Former-commit-id: 9add0ef201cc8f3c934af91c51aad94057d2e9e3
This commit is contained in:
2023-02-20 16:49:59 -05:00
parent 6173a11710
commit 2c78a1456c
+1 -1
View File
@@ -3,7 +3,7 @@
_path_gen() {
local sshyp_path="$HOME/.local/share/sshyp"
local sshyp_path_length="$(("${#sshyp_path}" + 1))"
readarray -t full_paths < <(find "$sshyp_path" -type f -exec ls {} \;)
mapfile -t full_paths < <(find "$sshyp_path" -type f -exec ls {} \;)
for path in "${full_paths[@]}"; do
trimmed_path=$(echo ${path%????} | cut -c"$sshyp_path_length"-)
trimmed_path=$(echo ${trimmed_path// /\\ })