mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-30 05:46:31 -04:00
Former-commit-id: 17f1773c8653e8525fd58380a34f6574473ed62c Former-commit-id: 3c90b366b8c9ad3c083110d0c9b0f19080fbdea7
29 lines
511 B
Bash
Executable File
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
|