diff options
author | Mathias Bynens <mathias@qiwi.be> | 2012-08-23 12:08:24 +0200 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2012-08-23 12:08:24 +0200 |
commit | acfad0ca6a117341207f10a957e52deed38999c0 (patch) | |
tree | 7a035736552b73b4741cd3dd20d5c43e9646bf3e /.functions | |
parent | 966756f5f1979736d8a64b5534218fc8353cd664 (diff) | |
download | dotfiles-acfad0ca6a117341207f10a957e52deed38999c0.tar.gz dotfiles-acfad0ca6a117341207f10a957e52deed38999c0.tar.bz2 dotfiles-acfad0ca6a117341207f10a957e52deed38999c0.zip |
.functions: Optimize `dataurl`
Thanks to @lri: https://github.com/fin1te/dotfiles/commit/b8ce15ee91bc8658c27599347c376c30c6bfa1e1#commitcomment-1749202
Diffstat (limited to '.functions')
-rw-r--r-- | .functions | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -13,7 +13,7 @@ fi # Create a data URL from a file function dataurl() { - local mimeType=$(file --mime-type "$1" | cut -d ' ' -f2) + local mimeType=$(file -b --mime-type "$1") if [[ $mimeType == text/* ]]; then mimeType="${mimeType};charset=utf-8" fi |