mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 16:47:14 -04:00
Fixed zsh completions script breaking $path
Former-commit-id: 7179fd168dd5c5a68854a72efe6a00153b97f1e5 Former-commit-id: 3329e42498daa2a78295bcd8949d8c7281d3575b
This commit is contained in:
@@ -4,10 +4,10 @@ _path_gen() {
|
|||||||
local sshyp_path="$HOME/.local/share/sshyp"
|
local sshyp_path="$HOME/.local/share/sshyp"
|
||||||
local glob_status=$(shopt -p globstar)
|
local glob_status=$(shopt -p globstar)
|
||||||
[ -z "${glob_status##*u*}" ] && shopt -s globstar # if recursive globbing is disabled, enable it
|
[ -z "${glob_status##*u*}" ] && shopt -s globstar # if recursive globbing is disabled, enable it
|
||||||
full_paths=("$sshyp_path"/**/*.gpg)
|
local full_paths=("$sshyp_path"/**/*.gpg)
|
||||||
$glob_status # set recursive globbing to user default
|
$glob_status # set recursive globbing to user default
|
||||||
for path in "${full_paths[@]}"; do
|
for path in "${full_paths[@]}"; do
|
||||||
trimmed_paths+=("${path:${#sshyp_path}:-4}")
|
trimmed_paths+=("${path:${#sshyp_path}:-4}")
|
||||||
done
|
done
|
||||||
} &&
|
} &&
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
sshyp_path="$HOME/.local/share/sshyp"
|
sshyp_path="$HOME/.local/share/sshyp"
|
||||||
full_paths=("$sshyp_path"/**/*.gpg)
|
full_paths=("$sshyp_path"/**/*.gpg)
|
||||||
for path in "${full_paths[@]}"; do
|
for scan_path in "${full_paths[@]}"; do
|
||||||
trimmed_paths+=("${${path#$sshyp_path}%????}")
|
trimmed_paths+=("${${scan_path#$sshyp_path}%????}")
|
||||||
done
|
done
|
||||||
|
|
||||||
case ${words[-2]} in
|
case ${words[-2]} in
|
||||||
|
|||||||
Reference in New Issue
Block a user