The housing is only providing a flexible tube of fixed length for the inner wire to run through. It doesn't affect function in any way. If the shifting is hard, look for a source of cable friction, or maybe sticky clutch plates in the lever.
The fact that you mention hard shifting and not staying put in the same sentence makes me thing there's something wrong with the lever itself, not the cable.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.