When the cable snaps, the mech will go to the smallest sprocket regardless, as that's the way it works. If the break is other than in the shifter, you can use the broken end to jury rig it into lower gear. Extract the broken end, with nipple attached from the shifter. Remove the broken bit from the mech. Feed the bit from the shifter into the mech, such that the nipple jams in the cable adjuster. Push the mech across to a middling gear. With your third hand(!) clamp the cable onto the mech, so the mech stays in place. Fine adjustment, to stop that nasty rattling noise, is achieved by twisting the cable adjuster.
We did this to The Claud's bike on an FNRTTC, albiet with a whole new cable, after her shifter eat the old one. It was Adrian's idea
I'd do that but it did snap at the shifter - pretty much precisely so, as the broken cable sticks out of the shifter-end of the outer. Still, a cheap and easy problem to fix, so with any luck I'll have the bike running again by tomorrow evening, if not sooner.
, guy on a road bike(maybe carbon will check later) who I have often seen riding, caught me at a junction just after a cycle path( I always ride very slowly on cycle paths).

Cannot remember the last time my bike got to Thursday looking the same as it did on Monday.
but the important thing it worked; I'm left with a severely twisted link but I can wheel the bike home 