mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-31 06:16:29 -04:00
Switch to mapfile for a minor completions speed improvement
Former-commit-id: b1c6d34c450dc0adb6df20fa25a7fa53c6c39ccb [formerly 1975424886]
Former-commit-id: 9add0ef201cc8f3c934af91c51aad94057d2e9e3
This commit is contained in:
@@ -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// /\\ })
|
||||
|
||||
Reference in New Issue
Block a user