mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-03 07:37:16 -04:00
Roughly halved the amount of time to source bash completions
This commit is contained in:
@@ -5,7 +5,8 @@ _path_gen() {
|
|||||||
local sshyp_path_length="$(("${#sshyp_path}" + 1))"
|
local sshyp_path_length="$(("${#sshyp_path}" + 1))"
|
||||||
readarray -t full_paths < <(find "$sshyp_path" -type f -exec ls {} \;)
|
readarray -t full_paths < <(find "$sshyp_path" -type f -exec ls {} \;)
|
||||||
for path in "${full_paths[@]}"; do
|
for path in "${full_paths[@]}"; do
|
||||||
trimmed_path=$(echo $path | sed 's/.\{4\}$//' | cut -c"$sshyp_path_length"-)
|
trimmed_path=${path%????}
|
||||||
|
trimmed_path=$(echo $trimmed_path | cut -c"$sshyp_path_length"-)
|
||||||
trimmed_path=$(echo ${trimmed_path// /\\ })
|
trimmed_path=$(echo ${trimmed_path// /\\ })
|
||||||
trimmed_paths+=("$trimmed_path")
|
trimmed_paths+=("$trimmed_path")
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user