Просмотр исходного кода

improve `ssh-add.zsh` check

Was actually returning `true` all the time. Thanks David!
Weiyi Lou 12 лет назад
Родитель
Сommit
8f23911289
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      zsh/omz-custom/ssh-add.zsh

+ 1 - 1
zsh/omz-custom/ssh-add.zsh

@@ -3,6 +3,6 @@
 #
 # We silence error output for when we're sshing to a machine that we don't want
 # to use ssh-agent forwarding for.
-if [[ `ssh-add -l 2> /dev/null` != *id_?sa* ]]; then
+if [[ `ssh-add -L | grep "^ssh-" | wc -l` == 0 ]]; then
   ssh-add 2> /dev/null
 fi