You can shorten a cable sheath by fitting a longer inner.
Or shorten the sleeve, much easier said than done, use a dremel with a cut off wheel and pray you dont nick the inner, after that unwind the cut off part trying to save the ferrule , then you have a shorter cable, if it comes out unscathed count yerself lucky.
Much easier to fit a longer inner.
You will need a solder pot, solder, Bakers soldering fluid, and some way of birds nesting the inner.
Push bike shops sell lengths of suitable inner with a nipple that will work for the carb slide end, these come way oversize, cut to your desired length., reuse the old twistgrip nipple after unsoldering it from the old cable to make up the new longer inner.