]> Sergey Matveev's repositories - zsh-autoenv.git/commitdiff
_autoenv_hash_pair: use sha1sum (C) instead of shasum (Perl) (#52)
authorDaniel Hahler <github@thequod.de>
Thu, 15 Dec 2016 09:36:35 +0000 (10:36 +0100)
committerArash Rouhani <miffoljud@gmail.com>
Thu, 15 Dec 2016 09:36:35 +0000 (16:36 +0700)
This improves performance.

autoenv.zsh

index b6863cb443156cf61a232046c1124107d711f59e..5882f9f6564143d3b41976133455d7ce05073593 100644 (file)
@@ -179,7 +179,7 @@ _autoenv_hash_pair() {
       echo "Missing file argument for _autoenv_hash_pair!" >&2
       return 1
     fi
-    env_shasum=$(shasum $env_file | cut -d' ' -f1)
+    env_shasum=$(sha1sum $env_file | cut -d' ' -f1)
   fi
   echo ":${env_file}:${env_shasum}:1"
 }