I dip the (previously carefully degreased) end of the cable in hammerite paint. It takes considerable time to completely set, but then it's as good as the metallic cap.
For example, that's what I did with the brake cable on the Nexus 8, so now I don't bother re-capping it every time I change the tire.