diff options
author | Xavier Hsinyuan <me@lstlx.com> | 2021-10-15 18:56:46 +0800 |
---|---|---|
committer | dana <dana@dana.is> | 2021-10-16 20:23:41 -0500 |
commit | 0f1e4d8e78a9692eaf38da8fd4ee6b23b75e2fdf (patch) | |
tree | 865b1d93aed5ae81f41575098096443b48296b17 /Completion/Unix | |
parent | 713588e2350ef2257f2f8a934041832234876b92 (diff) | |
download | zsh-0f1e4d8e78a9692eaf38da8fd4ee6b23b75e2fdf.tar.gz zsh-0f1e4d8e78a9692eaf38da8fd4ee6b23b75e2fdf.tar.xz zsh-0f1e4d8e78a9692eaf38da8fd4ee6b23b75e2fdf.zip |
github #79 (tweaked): _ssh: update options in apple's version of ssh-add
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_ssh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 20087174c..2385272f1 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -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]' \ |