format pasted commands