xsub snippet