Files
sshyp/extra/completion.zsh
T
RandyTheSilly ed9c69248b Fixed zsh completions script breaking $path
Former-commit-id: 7179fd168dd5c5a68854a72efe6a00153b97f1e5
Former-commit-id: 3329e42498daa2a78295bcd8949d8c7281d3575b
2023-03-09 16:24:47 -05:00

29 lines
521 B
Bash
Executable File

#compdef sshyp
sshyp_path="$HOME/.local/share/sshyp"
full_paths=("$sshyp_path"/**/*.gpg)
for scan_path in "${full_paths[@]}"; do
trimmed_paths+=("${${scan_path#$sshyp_path}%????}")
done
case ${words[-2]} in
sshyp )
compadd $trimmed_paths
;;
/* )
compadd {add,edit,copy,gen,shear}
;;
add )
compadd {folder,note,password}
;;
copy )
compadd {note,password,url,username}
;;
edit )
compadd {note,password,relocate,url,username}
;;
gen )
compadd update
;;
esac