Skip to content

Back to Toolbox

Useful shell aliases

Open a man page in the macOS manpage viewer

Taken from Armin Briegel's On viewing man pages.

# Open a man page in the macOS manpage viewer.
# Sample usage: xman grep
function xman() {
open x-man-page://$@ ;
}

Produce an HTML <img> element for an image file

This command uses ImageMagick.

# Generate an HTML <img> element for an image file with ImageMagick
# Sample usage: img path/to/my/image.png
alias img="magick identify -format \"<img src='%i' width='%w' height='%h'/>\n\""