Think of a medieval knight riding off to battle completely encased (from head to foot, as it were) in armor. Knights thus outfitted were said to be 'armed cap-a-pie.' The term cap-a-pie (or cap-à-pie)