mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Roughly halved the amount of time to source bash completions
Former-commit-id: 624a99a5727e49b12c1468c27110cee893124fd2 [formerly f411a56d1f]
Former-commit-id: 48802e27abb02efaf80743bd4fc8dbe3a03219fa
This commit is contained in:
@@ -5,7 +5,8 @@ _path_gen() {
|
||||
local sshyp_path_length="$(("${#sshyp_path}" + 1))"
|
||||
readarray -t full_paths < <(find "$sshyp_path" -type f -exec ls {} \;)
|
||||
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_paths+=("$trimmed_path")
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user