Files
sshyp/extra/completion.zsh
T
RandyTheSilly 3f4173b4fd Improved order completions are served in
Former-commit-id: e1eae46e144920b58c613d5e710d1ee30d3841a7
Former-commit-id: b6e78af74b29add6e63a708bdfc807dfe92c1094
2023-03-27 10:34:19 -04: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,gen,edit,copy,shear}
;;
add )
compadd {password,note,folder}
;;
copy )
compadd {password,username,url,note}
;;
edit )
compadd {password,username,url,note,relocate}
;;
gen )
compadd update
;;
esac