Typing the command "/repair" will enchant repair enchantments on items in your hand. If you type it again, it will remove the enchantments from your hand.
repair enchantments will cause items in the player's inventory with this enchantment to be immediately repaired.