1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-04-19 08:34:00 +02:00

github #79 (tweaked): _ssh: update options in apple's version of ssh-add

This commit is contained in:
Xavier Hsinyuan 2021-10-15 18:56:46 +08:00 committed by dana
parent 713588e235
commit 0f1e4d8e78
2 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2021-10-16 dana <dana@dana.is>
* github #79 (tweaked): Xavier Hsinyuan:
Completion/Unix/Command/_ssh: update options in apple's version
of ssh-add
2021-10-13 Matthew Martin <phy1729@gmail.com>
* 49441: Completion/Unix/Command/_timeout: Add OpenBSD.

View File

@ -81,9 +81,19 @@ _ssh () {
'*:file:->file' "$common[@]" "$common_transfer[@]" && ret=0
;;
ssh-add)
[[ $OSTYPE == darwin* ]] && args=(
'-A[add identities from keychain]'
'-K[update keychain when adding/removing identities]'
if [[ $OSTYPE != darwin* || $APPLE_SSH_ADD_BEHAVIOR == openssh ]]; then
args=(
'-K[load resident keys from a FIDO authenticator]'
)
else
[[ ${APPLE_SSH_ADD_BEHAVIOR:-macos} == macos ]] && args=(
'-A[add identities from keychain]'
'-K[update keychain when adding/removing identities]'
)
fi
[[ $OSTYPE == darwin<20->.* ]] && args+=(
'--apple-load-keychain[add identities from keychain]'
'--apple-use-keychain[update keychain when adding/removing identities]'
)
_arguments -s : $args \
'-c[identity is subject to confirmation via SSH_ASKPASS]' \