mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Use globbing to generate entry list for shell completion (faster)
Former-commit-id: ea8212223896fc86368f772f43053f6ee8742068 Former-commit-id: 5f35b58014dcc00cb733d4980e28157e4de1ffcb
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))"
|
||||
mapfile -t full_paths < <(find "$sshyp_path" -type f -exec ls {} \;)
|
||||
full_paths=(~/.local/share/sshyp/**/*.gpg)
|
||||
for path in "${full_paths[@]}"; do
|
||||
trimmed_path=$(echo ${path%????} | cut -c"$sshyp_path_length"-)
|
||||
trimmed_paths+=("$trimmed_path")
|
||||
|
||||
Reference in New Issue
Block a user