From 3f4173b4fd486a83d01e5efd122cd2d17f9efefa Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 27 Mar 2023 10:34:19 -0400 Subject: [PATCH] Improved order completions are served in Former-commit-id: e1eae46e144920b58c613d5e710d1ee30d3841a7 Former-commit-id: b6e78af74b29add6e63a708bdfc807dfe92c1094 --- extra/completion.bash | 8 ++++---- extra/completion.zsh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/extra/completion.bash b/extra/completion.bash index 13ffa5a..b8b0ddc 100755 --- a/extra/completion.bash +++ b/extra/completion.bash @@ -20,16 +20,16 @@ _sshyp_completions() { while read -r; do ITEM=${REPLY// /\\ }; COMPREPLY+=( "$ITEM" ); done < <( compgen -W "$(printf "'%s' " "${trimmed_paths[@]}")" -- "$cur" ) ;; /* ) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "add edit copy gen shear" -- "$cur" ) + while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "add gen edit copy shear" -- "$cur" ) ;; add ) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "folder note password" -- "$cur" ) + while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "password note folder" -- "$cur" ) ;; copy ) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "note password url username" -- "$cur" ) + while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "password username url note" -- "$cur" ) ;; edit ) - while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "note password relocate url username" -- "$cur" ) + while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "password username url note relocate" -- "$cur" ) ;; gen ) while read -r; do COMPREPLY+=( "$REPLY" ); done < <( compgen -W "update" -- "$cur" ) diff --git a/extra/completion.zsh b/extra/completion.zsh index 4e2346f..9182de6 100755 --- a/extra/completion.zsh +++ b/extra/completion.zsh @@ -11,16 +11,16 @@ case ${words[-2]} in compadd $trimmed_paths ;; /* ) - compadd {add,edit,copy,gen,shear} + compadd {add,gen,edit,copy,shear} ;; add ) - compadd {folder,note,password} + compadd {password,note,folder} ;; copy ) - compadd {note,password,url,username} + compadd {password,username,url,note} ;; edit ) - compadd {note,password,relocate,url,username} + compadd {password,username,url,note,relocate} ;; gen ) compadd update