mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-29 05:16:27 -04:00
Former-commit-id: 7179fd168dd5c5a68854a72efe6a00153b97f1e5 Former-commit-id: 3329e42498daa2a78295bcd8949d8c7281d3575b
29 lines
521 B
Bash
Executable File
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
|