mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-19 11:31:26 +01:00
github #79 (tweaked): _ssh: update options in apple's version of ssh-add
This commit is contained in:
parent
713588e235
commit
0f1e4d8e78
2 changed files with 19 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -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]' \
|
||||
|
|
Loading…
Reference in a new issue