#!/bin/bash # support spaces after "mailto:" even if they are probably wrong mailto=$(printf "%s" "$1" | sed -r 's#^mailto:\s*#mailto:#') term-open mutt "$mailto"