Initial zsh completion support (for generic-based packages)

Former-commit-id: 17f1773c8653e8525fd58380a34f6574473ed62c
Former-commit-id: 3c90b366b8c9ad3c083110d0c9b0f19080fbdea7
This commit is contained in:
2023-03-09 16:04:17 -05:00
parent 648bed832f
commit 902e041f51
3 changed files with 35 additions and 6 deletions
+28
View File
@@ -0,0 +1,28 @@
#compdef sshyp
sshyp_path="$HOME/.local/share/sshyp"
full_paths=("$sshyp_path"/**/*.gpg)
for path in "${full_paths[@]}"; do
trimmed_paths+=("${${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