Files
sshyp/extra/completion.zsh
T
RandyTheSilly 902e041f51 Initial zsh completion support (for generic-based packages)
Former-commit-id: 17f1773c8653e8525fd58380a34f6574473ed62c
Former-commit-id: 3c90b366b8c9ad3c083110d0c9b0f19080fbdea7
2023-03-09 16:04:17 -05:00

29 lines
511 B
Bash
Executable File

#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