#shellcheck shell=ksh _SSH_HOSTS=$(awk '/^Host/ {print $2}' ~/.ssh/config) #shellcheck disable=2086 set -A complete_mosh -- $_SSH_HOSTS #shellcheck disable=2086 set -A complete_scp -- $_SSH_HOSTS #shellcheck disable=2086 set -A complete_rsync -- $_SSH_HOSTS #shellcheck disable=2086 set -A complete_ssh -- $_SSH_HOSTS _passwordStoreEntries() { _passDir="$HOME/.password-store" find "$_passDir" -type f -iname '*.gpg' | while read -r _line; do _line="${_line##"$_passDir"}" _line="${_line#/}" _line="${_line%.gpg}" echo "$_line" done } #shellcheck disable=SC2046 set -A complete_pass -- -c show find otp grep insert edit generate rm mv cp $(_passwordStoreEntries)