aboutsummaryrefslogtreecommitdiffstats
path: root/.functions
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2012-08-23 12:08:24 +0200
committerMathias Bynens <mathias@qiwi.be>2012-08-23 12:08:24 +0200
commitacfad0ca6a117341207f10a957e52deed38999c0 (patch)
tree7a035736552b73b4741cd3dd20d5c43e9646bf3e /.functions
parent966756f5f1979736d8a64b5534218fc8353cd664 (diff)
downloaddotfiles-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--.functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/.functions b/.functions
index 931bbf7..ddb0f82 100644
--- a/.functions
+++ b/.functions
@@ -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