I fixed my cable by putting a crimp ferrule cap on the end like it should have had anyway. It was hard to find one by itself in the right size, and paid a lot relatively for postage, but was only $10 total.
Cable Housing End Cap Rear Brake 7mm (L9H-4350125)
Replacement Cable and housing for a gear on a vintage vespa or lambretta motor scooter
scooter-speed.com