Definitely just pants - the more the wound breathes the better. Anything else is an infection risk.
I actually wore mesh pants at home with dresses to air it as much as possible. I also used a new, clean maternity pad to dry it thoroughly after every shower and lay down for a few minutes to air it.
Both my c section wounds healed really well both times.