Parcourir la source

Tiny fix around mssh completion

Emmanuel Bouthenot il y a 13 ans
Parent
commit
bffa9b5cfb
1 fichiers modifiés avec 4 ajouts et 2 suppressions
  1. 4 2
      .zsh.d/config.d/alias.zsh

+ 4 - 2
.zsh.d/config.d/alias.zsh

@@ -103,6 +103,8 @@ fi
 #
 # Mssh stuff
 #
-hosts=($(grep '^Host [^*]' ~/.ssh/config | sed 's/Host //'))
-compctl -k hosts mssh
+if [ -f ~/.ssh/config ]; then
+    hosts=($(grep '^Host [^*]' ~/.ssh/config | sed 's/Host //'))
+    compctl -k hosts mssh
+fi