Car is 1.9cdti z19dt 120bhp.

On the way from work, gear starts coming out of 2nd gear at times and after about 5miles, gear was no longer selecting. Got out to investigate and this was what I found. Gear cable has broken.

gear cable 1.jpg

Can someone explain whether it is just a case of buying new cable and fitting? Is there any how2 for this or does anyone know how to go about it please? Thanks.