If you have commands grouped by category (which can be enabled by clicking the rectangle icon at the bottom left of the "Edit a Profile" window), you can right-click the category header (commands don't have to be in a category, you can do this with "- [No Category]" as well) and choose "Rename category..."
For other purposes, commands must be edited one at a time.