mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-10-26 20:39:56 -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:
1 parent
4f409f62d6
commit
843dff6527
1 file changed
+1
-1
@@ -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