mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-02 23:27:17 -04:00
Initial zsh completion support (for generic-based packages)
Former-commit-id: 17f1773c8653e8525fd58380a34f6574473ed62c Former-commit-id: 3c90b366b8c9ad3c083110d0c9b0f19080fbdea7
This commit is contained in:
Executable
+28
@@ -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
|
||||
Reference in New Issue
Block a user