Converting terminal shortcuts to functions