Fixing ssl-cert-{sha512,sha256,sha1,md5}()
[grml-etc-core.git] / etc / zsh / zshrc
index decda2b..0b82cb3 100644 (file)
@@ -3079,14 +3079,14 @@ exit 0;
 ssl_hashes=( sha512 sha256 sha1 md5 )
 
 for sh in ${ssl_hashes}; do
-    ssl-cert-${sh}() {
+    eval 'ssl-cert-'${sh}'() {
         emulate -L zsh
         if [[ -z $1 ]] ; then
-            printf 'usage: %s <file>\n' "ssh-cert-${sh}"
+            printf '\''usage: %s <file>\n'\'' "ssh-cert-'${sh}'"
             return 1
         fi
-        openssl x509 -noout -fingerprint -${sh} -in $1
-    }
+        openssl x509 -noout -fingerprint -'${sh}' -in $1
+    }'
 done; unset sh
 
 ssl-cert-fingerprints() {