    "# Based on http://stackoverflow.com/questions/12306223/how-to-manually-create-icns-files-using-iconutil
 # Note: png must be 1024x1024
 mkdir <<fne>>.iconset
-sips -z 16 16 <<f>> --out <<fne>>.iconset/icon_16x16.png
-sips -z 32 32 <<f>> --out <<fne>>.iconset/icon_16x16@2x.png
-sips -z 32 32 <<f>> --out <<fne>>.iconset/icon_32x32.png
-sips -z 64 64 <<f>> --out <<fne>>.iconset/icon_32x32@2x.png
-sips -z 128 128 <<f>> --out <<fne>>.iconset/icon_128x128.png
-sips -z 256 256 <<f>> --out <<fne>>.iconset/icon_128x128@2x.png
-sips -z 256 256 <<f>> --out <<fne>>.iconset/icon_256x256@2x.png
-sips -z 512 512 <<f>> --out <<fne>>.iconset/icon_512x512.png
-sips -z 512 512 <<f>> --out <<fne>>.iconset/icon_256x256@2x.png
-sips -z 1024 1024 <<f>> --out <<fne>>.iconset/icon_512x512@2x.png
-iconutil -c icns <<fne>>.iconset
+sips -z 16 16 '<<f>>' --out '<<fne>>.iconset/icon_16x16.png'
+sips -z 32 32 '<<f>>' --out '<<fne>>.iconset/icon_16x16@2x.png'
+sips -z 32 32 '<<f>>' --out '<<fne>>.iconset/icon_32x32.png'
+sips -z 64 64 '<<f>>' --out '<<fne>>.iconset/icon_32x32@2x.png'
+sips -z 128 128 '<<f>>' --out '<<fne>>.iconset/icon_128x128.png'
+sips -z 256 256 '<<f>>' --out '<<fne>>.iconset/icon_128x128@2x.png'
+sips -z 256 256 '<<f>>' --out '<<fne>>.iconset/icon_256x256@2x.png'
+sips -z 512 512 '<<f>>' --out '<<fne>>.iconset/icon_512x512.png'
+sips -z 512 512 '<<f>>' --out '<<fne>>.iconset/icon_256x256@2x.png'
+sips -z 1024 1024 '<<f>>' --out '<<fne>>.iconset/icon_512x512@2x.png'
+iconutil -c icns `<<fne>>.iconset'
 "
    :utils '("sips" "iconutil")
    :extensions "png"))

  (interactive)
  (dwim-shell-command-on-marked-files
   "Convert to optimized gif"
   "ffmpeg -loglevel quiet -stats -y -i <<f>> -pix_fmt rgb24 -r 15 <<fne>>.gif
    gifsicle -O3 <<fne>>.gif --lossy=80 -o <<fne>>.gif"
   :utils '("ffmpeg" "gifsicle")))

(defun dwim-shell-command-unzip ()
  "Unzip all marked archives (of any kind) using `atool'."
  (interactive)
  (dwim-shell-command-on-marked-files
   "Unzip" "atool --extract --explain <<f>>"
   :utils "atool"))

(defun dwim-shell-command-speed-up-gif ()

  (interactive)
  (dwim-shell-command-on-marked-files
   "Convert to mp3"
   "ffmpeg -stats -n -i '<<f>>' -acodec libmp3lame '<<fne>>.mp3'"
   :utils "ffmpeg"))

(defun dwim-shell-command-convert-image-to-jpg ()
